From 52f0aaa9c600dbe8c078fb1d2212e8cea675cd40 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 23 Nov 2018 12:25:37 +0200 Subject: convert PropType to scoped enum and drop unused values Change-Id: Ied5a5aa9c98417b873eeea28fb126f815e742159 Reviewed-on: https://gerrit.libreoffice.org/63947 Tested-by: Jenkins Reviewed-by: Noel Grandin --- oox/source/dump/dffdumper.cxx | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'oox/source') diff --git a/oox/source/dump/dffdumper.cxx b/oox/source/dump/dffdumper.cxx index f3d760f23a02..9fe67ca16671 100644 --- a/oox/source/dump/dffdumper.cxx +++ b/oox/source/dump/dffdumper.cxx @@ -154,7 +154,7 @@ sal_uInt32 DffStreamObject::dumpDffSimpleColor( const String& rName ) namespace { -enum PropType { PROPTYPE_BINARY, PROPTYPE_STRING, PROPTYPE_BLIP, PROPTYPE_COLORARRAY }; +enum class PropType { Binary }; struct PropInfo { @@ -185,7 +185,7 @@ void DffStreamObject::dumpDffOpt() if( getFlag( nPropId, DFF_OPT_COMPLEX ) ) { writeHexItem( "complex-size", nValue, "CONV-DEC" ); - aPropInfos.emplace_back( String( "property-data" ), PROPTYPE_BINARY, nBaseId, nValue ); + aPropInfos.emplace_back( String( "property-data" ), PropType::Binary, nBaseId, nValue ); } else { @@ -205,18 +205,10 @@ void DffStreamObject::dumpDffOpt() IndentGuard aIndent( mxOut ); switch(propInfo.meType) { - case PROPTYPE_BINARY: - dumpBinary( propInfo.maName, propInfo.mnSize ); - break; - case PROPTYPE_STRING: - dumpUnicodeArray( propInfo.maName, propInfo.mnSize / 2, true ); - break; - case PROPTYPE_BLIP: - dumpBinary( propInfo.maName, propInfo.mnSize ); - break; - case PROPTYPE_COLORARRAY: + case PropType::Binary: dumpBinary( propInfo.maName, propInfo.mnSize ); break; + default: assert(false && "missing implementation?"); } } } -- cgit