diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-07-31 19:59:20 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-08-27 08:30:49 +0900 |
commit | bba73f9e0f286f48fe02f7e232c53de79fc5f12c (patch) | |
tree | bb4db615049eb85124e7c771352fb9a37755b483 | |
parent | e16e64dd862c8f386f80de43ad68e831e169d49d (diff) |
get rid of the macro here
Change-Id: I1ba5583d9121b541b6b76588f1334980abe3836e
-rw-r--r-- | svx/source/xoutdev/xtable.cxx | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx index b3f1416d8ceb..02ad986b1757 100644 --- a/svx/source/xoutdev/xtable.cxx +++ b/svx/source/xoutdev/xtable.cxx @@ -308,27 +308,36 @@ bool XPropertyList::SaveTo( const uno::Reference< embed::XStorage > &xStorage, return SvxXMLXTableExportComponent::save( rURL, createInstance(), xStorage, pOptName ); } -XPropertyListRef XPropertyList::CreatePropertyList( XPropertyListType t, +XPropertyListRef XPropertyList::CreatePropertyList( XPropertyListType aType, const OUString& rPath, const OUString& rReferer ) { XPropertyListRef pRet; -#define MAP(e,c) \ - case e: pRet = XPropertyListRef (new c( rPath, rReferer ) ); break - switch (t) { - MAP( XCOLOR_LIST, XColorList ); - MAP( XLINE_END_LIST, XLineEndList ); - MAP( XDASH_LIST, XDashList ); - MAP( XHATCH_LIST, XHatchList ); - MAP( XGRADIENT_LIST, XGradientList ); - MAP( XBITMAP_LIST, XBitmapList ); + switch (aType) { + case XCOLOR_LIST: + pRet = XPropertyListRef(new XColorList(rPath, rReferer)); + break; + case XLINE_END_LIST: + pRet = XPropertyListRef(new XLineEndList(rPath, rReferer)); + break; + case XDASH_LIST: + 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: OSL_FAIL("unknown xproperty type"); break; } -#undef MAP - OSL_ASSERT( !pRet.is() || pRet->meType == t ); + OSL_ASSERT( !pRet.is() || pRet->meType == aType ); return pRet; } |