From 6340daac7b99c65249363a4bb61c492de31ef5d6 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 15 Apr 2019 18:32:01 +0200 Subject: Revert broken loplugin:sequentialassign change Reverting part of 1123a47c9771e0f4a680316c034e9878919a85d5 "loplugin:sequentialassign in sw" that had caused e.g. CppunitTest_chart2_export to fail in UBSan builds like > /sw/source/core/layout/frmtool.cxx:3540:77: runtime error: signed integer overflow: -47572123069180 * -47572123069180 cannot be represented in type 'long' > #0 0x2b44b168eeaf in GetFrameOfModify(SwRootFrame const*, SwModify const&, SwFrameType, SwPosition const*, std::pair const*) /sw/source/core/layout/frmtool.cxx:3540:77 > #1 0x2b44b07eb3f0 in SwContentNode::FindLayoutRect(bool, Point const*) const /sw/source/core/docnode/node.cxx:1169:60 > #2 0x2b45266573da in AttributeOutputBase::TextFlyContent(SwFormatFlyCnt const&) /sw/source/filter/ww8/ww8atr.cxx:3229:34 > #3 0x2b45265ecf49 in AttributeOutputBase::OutputItem(SfxPoolItem const&) /sw/source/filter/ww8/ww8atr.cxx:5258:13 (). Change-Id: I580f6fb3fb2f561b1cf76f8cf113bfe20aead844 --- sw/source/filter/ww8/ww8atr.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw') diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 160e0f931115..528634646659 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -3225,7 +3225,8 @@ void AttributeOutputBase::TextFlyContent( const SwFormatFlyCnt& rFlyContent ) { if ( auto pTextNd = dynamic_cast< const SwContentNode *>( GetExport().m_pOutFormatNode ) ) { - Point aLayPos = pTextNd->FindLayoutRect( false, &aLayPos ).Pos(); + Point aLayPos; + aLayPos = pTextNd->FindLayoutRect( false, &aLayPos ).Pos(); SwPosition aPos( *pTextNd ); ww8::Frame aFrame( *rFlyContent.GetFrameFormat(), aPos ); -- cgit