sw/source/core/unocore/unostyle.cxx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
New commits: commit 1e92234dd3726536410678b58b8195095922e9c0 Author: Bjoern Michaelsen <bjoern.michael...@canonical.com> Date: Thu Nov 20 01:25:56 2014 +0100 expand complex cascading conditional operator Change-Id: I3546589bbfaf1f19a9e283bc33a4a9e65e516dbc Reviewed-on: https://gerrit.libreoffice.org/13006 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 a66533c..c2b0982 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -745,11 +745,17 @@ uno::Any SwXStyleFamily::getByName(const OUString& rName) 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: + 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