diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-11-20 01:40:24 +0100 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2014-11-20 18:23:42 +0000 |
commit | e7f58e05ee2726f3b3f7af6ab255c613ccd47200 (patch) | |
tree | 3349872353d71bce9f47ad4f169f84f9014a29dd /sw | |
parent | 1e92234dd3726536410678b58b8195095922e9c0 (diff) |
expand complex cascading conditional operator
Change-Id: I8e489db0dbbd1bb420a3fa477232a86d2cd10b62
Reviewed-on: https://gerrit.libreoffice.org/13007
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8sty.cxx | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index c2b098267f3e..4dbb903ff57b 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -751,10 +751,10 @@ uno::Any SwXStyleFamily::getByName(const OUString& rName) xStyle = new SwXPageStyle(*pBasePool, pDocShell, eFamily, sStyleName); break; case SFX_STYLE_FAMILY_FRAME: - xStyle = new SwXFrameStyle(*pBasePool, pDocShell->GetDoc(), pBase->GetName()): + xStyle = new SwXFrameStyle(*pBasePool, pDocShell->GetDoc(), pBase->GetName()); break; default: - new SwXStyle(*pBasePool, eFamily, pDocShell->GetDoc(), sStyleName); + xStyle = new SwXStyle(*pBasePool, eFamily, pDocShell->GetDoc(), sStyleName); } } aRet.setValue(&xStyle, cppu::UnoType<style::XStyle>::get()); diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 48901579e224..7593e992a86a 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -313,8 +313,11 @@ void MSWordStyles::BuildStyleIds() for (sal_uInt16 n = 1; n < nUsedSlots; ++n) { - const OUString aName(pFmtA[n]? pFmtA[n]->GetName(): (m_aNumRules.find(n) != m_aNumRules.end() ? m_aNumRules[n]->GetName() : OUString())); - + OUString aName; + if(pFmtA[n]) + aName = pFmtA[n]->GetName(); + else if (m_aNumRules.find(n) != m_aNumRules.end()) + aName = m_aNumRules[n]->GetName(); OStringBuffer aStyleIdBuf(aName.getLength()); for (int i = 0; i < aName.getLength(); ++i) { |