From afe6738b717f89a14be62fcf4645ec4d53642edd Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Sun, 8 Dec 2013 16:21:14 +0100 Subject: [PATCH] Fix static linkage and use SAL_N_ELEMENTS Change-Id: Iced21e010b3c06a5f36731f63d41ab55a5c8a2e4 --- filter/source/msfilter/util.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx index 614c3aca715f..bf5648d508cb 100644 --- a/filter/source/msfilter/util.cxx +++ b/filter/source/msfilter/util.cxx @@ -1088,10 +1088,10 @@ static const CustomShapeTypeTranslationTable pCustomShapeTypeTranslationTable[] { "ooxml-ribbon", "ribbon" }, }; -struct { +static struct { const char* sDML; MSO_SPT nVML; -} pDMLToVMLTable[] = { +} const pDMLToVMLTable[] = { {"notPrimitive", mso_sptNotPrimitive}, {"rectangle", mso_sptRectangle}, {"roundRectangle", mso_sptRoundRectangle}, @@ -1307,7 +1307,7 @@ const char* GetOOXMLPresetGeometry( const char* sShapeType ) if( pCustomShapeTypeTranslationHashMap == NULL ) { pCustomShapeTypeTranslationHashMap = new CustomShapeTypeTranslationHashMap (); - for( unsigned int i = 0; i < sizeof( pCustomShapeTypeTranslationTable )/sizeof( CustomShapeTypeTranslationTable ); i ++ ) + for( unsigned int i = 0; i < SAL_N_ELEMENTS(pCustomShapeTypeTranslationTable); ++i ) { (*pCustomShapeTypeTranslationHashMap)[ pCustomShapeTypeTranslationTable[ i ].sOOo ] = pCustomShapeTypeTranslationTable[ i ].sMSO; }