diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-16 15:51:26 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-08-17 08:45:15 +0200 |
commit | 48cb92cb1671bfdef3fcf43978455f19b26ca7bd (patch) | |
tree | c50dec2c019daff055e253d1b8230d8d00b8b369 /sd | |
parent | 430b93f7f3c9f5aeb89db634447cb554acd125aa (diff) |
convert XPropertyListType to scoped enum
Change-Id: I071c0d17c7c5982af47bccd92580bbac62bdf7b3
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/unoidl/UnoDocumentSettings.cxx | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index ec108a3afb0b..b34cdb12ba1e 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -268,12 +268,12 @@ static struct { const char *pName; XPropertyListType t; } aURLPropertyNames[] = { - { "ColorTableURL", XCOLOR_LIST }, - { "DashTableURL", XDASH_LIST }, - { "LineEndTableURL", XLINE_END_LIST }, - { "HatchTableURL", XHATCH_LIST }, - { "GradientTableURL", XGRADIENT_LIST }, - { "BitmapTableURL", XBITMAP_LIST } + { "ColorTableURL", XPropertyListType::Color }, + { "DashTableURL", XPropertyListType::Dash }, + { "LineEndTableURL", XPropertyListType::LineEnd }, + { "HatchTableURL", XPropertyListType::Hatch }, + { "GradientTableURL", XPropertyListType::Gradient }, + { "BitmapTableURL", XPropertyListType::Bitmap } }; static XPropertyListType getTypeOfName( const OUString &aName ) @@ -282,7 +282,7 @@ static XPropertyListType getTypeOfName( const OUString &aName ) if( aName.equalsAscii( rURLPropertyName.pName ) ) return rURLPropertyName.t; } - return UNKNOWN_XPROPERTYLISTTYPE; + return XPropertyListType::Unknown; } static OUString getNameOfType( XPropertyListType t ) @@ -307,7 +307,7 @@ uno::Sequence<beans::PropertyValue> for( sal_Int32 i = 0; i < aConfigProps.getLength(); i++ ) { XPropertyListType t = getTypeOfName( aConfigProps[i].Name ); - if (t == UNKNOWN_XPROPERTYLISTTYPE) + if (t == XPropertyListType::Unknown) aRet[nRet++] = aConfigProps[i]; else { @@ -351,7 +351,7 @@ uno::Sequence<beans::PropertyValue> { XPropertyListType t = getTypeOfName( aConfigProps[i].Name ); aRet[i] = aConfigProps[i]; - if (t >= 0) { + if (t != XPropertyListType::Unknown) { XPropertyListRef pList = pDoc->GetPropertyList( t ); if( !pList.is() || !pList->IsEmbedInDocument() ) continue; // no change ... @@ -434,27 +434,27 @@ throw (UnknownPropertyException, PropertyVetoException, switch( (*ppEntries)->mnHandle ) { case HANDLE_COLORTABLEURL: - AssignURL( XCOLOR_LIST, pValues, &bOk, &bChanged ); + AssignURL( XPropertyListType::Color, pValues, &bOk, &bChanged ); break; case HANDLE_DASHTABLEURL: - AssignURL( XDASH_LIST, pValues, &bOk, &bChanged ); + AssignURL( XPropertyListType::Dash, pValues, &bOk, &bChanged ); break; case HANDLE_LINEENDTABLEURL: - AssignURL( XLINE_END_LIST, pValues, &bOk, &bChanged ); + AssignURL( XPropertyListType::LineEnd, pValues, &bOk, &bChanged ); break; case HANDLE_HATCHTABLEURL: - AssignURL( XHATCH_LIST, pValues, &bOk, &bChanged ); + AssignURL( XPropertyListType::Hatch, pValues, &bOk, &bChanged ); break; case HANDLE_GRADIENTTABLEURL: - AssignURL( XGRADIENT_LIST, pValues, &bOk, &bChanged ); + AssignURL( XPropertyListType::Gradient, pValues, &bOk, &bChanged ); break; case HANDLE_BITMAPTABLEURL: - AssignURL( XBITMAP_LIST, pValues, &bOk, &bChanged ); + AssignURL( XPropertyListType::Bitmap, pValues, &bOk, &bChanged ); break; case HANDLE_FORBIDDENCHARS: @@ -1012,22 +1012,22 @@ throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std:: switch( (*ppEntries)->mnHandle ) { case HANDLE_COLORTABLEURL: - ExtractURL( XCOLOR_LIST, pValue ); + ExtractURL( XPropertyListType::Color, pValue ); break; case HANDLE_DASHTABLEURL: - ExtractURL( XDASH_LIST, pValue ); + ExtractURL( XPropertyListType::Dash, pValue ); break; case HANDLE_LINEENDTABLEURL: - ExtractURL( XLINE_END_LIST, pValue ); + ExtractURL( XPropertyListType::LineEnd, pValue ); break; case HANDLE_HATCHTABLEURL: - ExtractURL( XHATCH_LIST, pValue ); + ExtractURL( XPropertyListType::Hatch, pValue ); break; case HANDLE_GRADIENTTABLEURL: - ExtractURL( XGRADIENT_LIST, pValue ); + ExtractURL( XPropertyListType::Gradient, pValue ); break; case HANDLE_BITMAPTABLEURL: - ExtractURL( XBITMAP_LIST, pValue ); + ExtractURL( XPropertyListType::Bitmap, pValue ); break; case HANDLE_FORBIDDENCHARS: *pValue <<= mxModel->getForbiddenCharsTable(); |