Kaydet (Commit) bba73f9e authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

get rid of the macro here

Change-Id: I1ba5583d9121b541b6b76588f1334980abe3836e
üst e16e64dd
...@@ -308,27 +308,36 @@ bool XPropertyList::SaveTo( const uno::Reference< embed::XStorage > &xStorage, ...@@ -308,27 +308,36 @@ bool XPropertyList::SaveTo( const uno::Reference< embed::XStorage > &xStorage,
return SvxXMLXTableExportComponent::save( rURL, createInstance(), xStorage, pOptName ); return SvxXMLXTableExportComponent::save( rURL, createInstance(), xStorage, pOptName );
} }
XPropertyListRef XPropertyList::CreatePropertyList( XPropertyListType t, XPropertyListRef XPropertyList::CreatePropertyList( XPropertyListType aType,
const OUString& rPath, const OUString& rPath,
const OUString& rReferer ) const OUString& rReferer )
{ {
XPropertyListRef pRet; XPropertyListRef pRet;
#define MAP(e,c) \ switch (aType) {
case e: pRet = XPropertyListRef (new c( rPath, rReferer ) ); break case XCOLOR_LIST:
switch (t) { pRet = XPropertyListRef(new XColorList(rPath, rReferer));
MAP( XCOLOR_LIST, XColorList ); break;
MAP( XLINE_END_LIST, XLineEndList ); case XLINE_END_LIST:
MAP( XDASH_LIST, XDashList ); pRet = XPropertyListRef(new XLineEndList(rPath, rReferer));
MAP( XHATCH_LIST, XHatchList ); break;
MAP( XGRADIENT_LIST, XGradientList ); case XDASH_LIST:
MAP( XBITMAP_LIST, XBitmapList ); pRet = XPropertyListRef(new XDashList(rPath, rReferer));
break;
case XHATCH_LIST:
pRet = XPropertyListRef(new XHatchList(rPath, rReferer));
break;
case XGRADIENT_LIST:
pRet = XPropertyListRef(new XGradientList(rPath, rReferer));
break;
case XBITMAP_LIST:
pRet = XPropertyListRef(new XBitmapList(rPath, rReferer));
break;
default: default:
OSL_FAIL("unknown xproperty type"); OSL_FAIL("unknown xproperty type");
break; break;
} }
#undef MAP OSL_ASSERT( !pRet.is() || pRet->meType == aType );
OSL_ASSERT( !pRet.is() || pRet->meType == t );
return pRet; return pRet;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment