sw/source/core/doc/DocumentContentOperationsManager.cxx | 17 +++++++++------- sw/source/core/unocore/unostyle.cxx | 4 +-- sw/source/filter/ww8/wrtw8sty.cxx | 7 ++++-- 3 files changed, 17 insertions(+), 11 deletions(-)
New commits: commit 6c015afd0c9d1b9c64a127ceab24a37969699239 Author: Bjoern Michaelsen <bjoern.michael...@canonical.com> Date: Thu Nov 20 17:10:45 2014 +0100 expand complex cascading conditional operator, step 1 Change-Id: I7d33d587b94877dac2ca1e9f4bb90baba3aea6ac Reviewed-on: https://gerrit.libreoffice.org/13008 Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> Tested-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 6955cde..9d93f36 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -3202,17 +3202,20 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl( SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); SwPosition const*const pAPos = pAnchor->GetCntntAnchor(); bool bAtCntnt = (pAnchor->GetAnchorId() == FLY_AT_PARA); - if ( pAPos && - ( bAtCntnt || - (pAnchor->GetAnchorId() == FLY_AT_FLY) || - (pAnchor->GetAnchorId() == FLY_AT_CHAR)) && - (( bCopyFlyAtFly && FLY_AT_FLY == pAnchor->GetAnchorId() ) + if ( !pAPos ) + continue; + if ( !bAtCntnt + && pAnchor->GetAnchorId() != FLY_AT_FLY + && pAnchor->GetAnchorId() != FLY_AT_CHAR) + continue; + if (( bCopyFlyAtFly && FLY_AT_FLY == pAnchor->GetAnchorId() ) ? rRg.aStart <= pAPos->nNode.GetIndex() + 1 : ( m_rDoc.getIDocumentRedlineAccess().IsRedlineMove() ? rRg.aStart < pAPos->nNode - : rRg.aStart <= pAPos->nNode )) && - pAPos->nNode <= rRg.aEnd ) + : rRg.aStart <= pAPos->nNode )) { + if ( pAPos->nNode > rRg.aEnd ) + continue; //frames at the last source node are not always copied: //- if the node is empty and is the last node of the document or a table cell // or a text frame then tey have to be copied commit e7f58e05ee2726f3b3f7af6ab255c613ccd47200 Author: Bjoern Michaelsen <bjoern.michael...@canonical.com> Date: Thu Nov 20 01:40:24 2014 +0100 expand complex cascading conditional operator Change-Id: I8e489db0dbbd1bb420a3fa477232a86d2cd10b62 Reviewed-on: https://gerrit.libreoffice.org/13007 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 c2b0982..4dbb903 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 4890157..7593e99 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) {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits