Kaydet (Commit) 15298a55 authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen Kaydeden (comit) Björn Michaelsen

expand complex cascading conditional operator

Change-Id: Iad995dcd6f1a65a623e7a1bfac8038ce568d40c0
Reviewed-on: https://gerrit.libreoffice.org/13005Reviewed-by: 's avatarBjörn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: 's avatarBjörn Michaelsen <bjoern.michaelsen@canonical.com>
üst 1a27475a
...@@ -700,11 +700,17 @@ uno::Any SwXStyleFamily::getByIndex(sal_Int32 nTempIndex) ...@@ -700,11 +700,17 @@ uno::Any SwXStyleFamily::getByIndex(sal_Int32 nTempIndex)
uno::Reference< style::XStyle > xStyle = _FindStyle(sStyleName); uno::Reference< style::XStyle > xStyle = _FindStyle(sStyleName);
if(!xStyle.is()) if(!xStyle.is())
{ {
xStyle = eFamily == SFX_STYLE_FAMILY_PAGE ? switch(eFamily)
new SwXPageStyle(*pBasePool, pDocShell, eFamily, sStyleName) : {
eFamily == SFX_STYLE_FAMILY_FRAME ? case SFX_STYLE_FAMILY_PAGE:
new SwXFrameStyle(*pBasePool, pDocShell->GetDoc(), pBase->GetName()): xStyle = new SwXPageStyle(*pBasePool, pDocShell, eFamily, sStyleName);
new SwXStyle(*pBasePool, eFamily, pDocShell->GetDoc(), 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()); aRet.setValue(&xStyle, cppu::UnoType<style::XStyle>::get());
} }
......
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