sw/source/core/unocore/unostyle.cxx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
New commits: commit 15298a55fbde6352f260b919c0e600737e01d4a7 Author: Bjoern Michaelsen <bjoern.michael...@canonical.com> Date: Thu Nov 20 01:23:10 2014 +0100 expand complex cascading conditional operator Change-Id: Iad995dcd6f1a65a623e7a1bfac8038ce568d40c0 Reviewed-on: https://gerrit.libreoffice.org/13005 Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> Tested-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 57ab928..a66533c 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -700,11 +700,17 @@ uno::Any SwXStyleFamily::getByIndex(sal_Int32 nTempIndex) uno::Reference< style::XStyle > xStyle = _FindStyle(sStyleName); if(!xStyle.is()) { - xStyle = eFamily == SFX_STYLE_FAMILY_PAGE ? - new SwXPageStyle(*pBasePool, pDocShell, eFamily, sStyleName) : - eFamily == SFX_STYLE_FAMILY_FRAME ? - new SwXFrameStyle(*pBasePool, pDocShell->GetDoc(), pBase->GetName()): - new SwXStyle(*pBasePool, eFamily, pDocShell->GetDoc(), sStyleName); + switch(eFamily) + { + case SFX_STYLE_FAMILY_PAGE: + xStyle = new SwXPageStyle(*pBasePool, pDocShell, eFamily, sStyleName); + break; + case SFX_STYLE_FAMILY_FRAME: + xStyle = new SwXFrameStyle(*pBasePool, pDocShell->GetDoc(), pBase->GetName()); + break; + default: + xStyle = new SwXStyle(*pBasePool, eFamily, pDocShell->GetDoc(), sStyleName); + } } aRet.setValue(&xStyle, cppu::UnoType<style::XStyle>::get()); }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits