[Libreoffice-commits] core.git: 2 commits - sw/source
Caolán McNamara
caolanm at redhat.com
Fri Dec 16 16:31:57 UTC 2016
sw/source/core/draw/dcontact.cxx | 3 +--
sw/source/filter/ww8/wrtw8esh.cxx | 16 +++++++++++-----
2 files changed, 12 insertions(+), 7 deletions(-)
New commits:
commit c175620c312652b521694547d335f4f70cb11661
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Dec 16 16:21:15 2016 +0000
crashtesting: 10 squillion .doc export asserts
since...
commit 880e622d2e324a85a7b2b6ddc60e06cc423195b4
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Sun Dec 11 14:30:44 2016 +0100
refactor out lcl_GetWW8Pos
IIUC the old code only changes the X/Y if its not NO_CONV for
that direction, so lets reintroduce that and then drop the assert
Change-Id: Ia5b0e668fff83466dc2ab59aa163cb9a87984b0e
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 47d1420..4d8d224 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1386,7 +1386,6 @@ namespace
return pAnchoredObj->GetRelPosToLine();
default: ;
}
- assert(false);
return Point();
}
}
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 7368c79..9f50c20 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -2675,16 +2675,22 @@ bool WinwordAnchoring::ConvertPosition( SwFormatHoriOrient& _iorHoriOri,
}
}
- if(eVertConv != sw::WW8AnchorConv::NO_CONV || eHoriConv != sw::WW8AnchorConv::NO_CONV)
+ if (eVertConv != sw::WW8AnchorConv::NO_CONV || eHoriConv != sw::WW8AnchorConv::NO_CONV)
{
sw::WW8AnchorConvResult aResult(eHoriConv, eVertConv);
_rFrameFormat.CallSwClientNotify(sw::WW8AnchorConvHint(aResult));
if(!aResult.m_bConverted)
return false;
- lcl_SetRelationOrient(_iorHoriOri, eHoriConv, [&_iorHoriOri]() {_iorHoriOri.SetHoriOrient(text::HoriOrientation::NONE);} );
- _iorHoriOri.SetPos(aResult.m_aPos.X());
- lcl_SetRelationOrient(_iorVertOri, eVertConv, [&_iorVertOri]() {_iorVertOri.SetVertOrient(text::VertOrientation::NONE);} );
- _iorVertOri.SetPos(aResult.m_aPos.Y());
+ if (eHoriConv != sw::WW8AnchorConv::NO_CONV)
+ {
+ lcl_SetRelationOrient(_iorHoriOri, eHoriConv, [&_iorHoriOri]() {_iorHoriOri.SetHoriOrient(text::HoriOrientation::NONE);} );
+ _iorHoriOri.SetPos(aResult.m_aPos.X());
+ }
+ if (eVertConv != sw::WW8AnchorConv::NO_CONV)
+ {
+ lcl_SetRelationOrient(_iorVertOri, eVertConv, [&_iorVertOri]() {_iorVertOri.SetVertOrient(text::VertOrientation::NONE);} );
+ _iorVertOri.SetPos(aResult.m_aPos.Y());
+ }
return true;
}
return false;
commit 50826a1152eb9ceaf234338e55685758262e4c17
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Dec 16 15:59:49 2016 +0000
fix a regression in lcl_GetWW8Pos
wrong since...
commit 880e622d2e324a85a7b2b6ddc60e06cc423195b4
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Sun Dec 11 14:30:44 2016 +0100
refactor out lcl_GetWW8Pos
Change-Id: If7b680aa80a3d2e197b853a46afdcee6be83046c
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 0ef9fca..47d1420 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1569,7 +1569,7 @@ void SwDrawContact::SwClientNotify(const SwModify& rMod, const SfxHint& rHint)
// No distinction between layout directions, because of missing
// information about WW8 in vertical layout.
rResult.m_aPos.setX(lcl_GetWW8Pos(pAnchoredObj, bFollowTextFlow, rResult.m_eHoriConv).getX());
- rResult.m_aPos.setY(lcl_GetWW8Pos(pAnchoredObj, bFollowTextFlow, rResult.m_eHoriConv).getY());
+ rResult.m_aPos.setY(lcl_GetWW8Pos(pAnchoredObj, bFollowTextFlow, rResult.m_eVertConv).getY());
rResult.m_bConverted = true;
}
else if (auto pRestoreFlyAnchorHint = dynamic_cast<const sw::RestoreFlyAnchorHint*>(&rHint))
More information about the Libreoffice-commits
mailing list