summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-12-16 16:21:15 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-12-16 16:25:27 +0000
commitc175620c312652b521694547d335f4f70cb11661 (patch)
tree47a2c82ad27bd594a57694d343e9f853149d2795
parent50826a1152eb9ceaf234338e55685758262e4c17 (diff)
crashtesting: 10 squillion .doc export asserts
since... commit 880e622d2e324a85a7b2b6ddc60e06cc423195b4 Author: Bjoern Michaelsen <bjoern.michaelsen@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
-rw-r--r--sw/source/core/draw/dcontact.cxx1
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx16
2 files changed, 11 insertions, 6 deletions
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 47d14202c5b6..4d8d2243c274 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 7368c79c7206..9f50c201a7b1 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;