[Libreoffice-commits] core.git: sw/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 15 16:37:43 UTC 2019


 sw/source/filter/ww8/ww8atr.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 6340daac7b99c65249363a4bb61c492de31ef5d6
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Apr 15 18:32:01 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Apr 15 18:32:01 2019 +0200

    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<Point, bool> 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
    
    (<https://ci.libreoffice.org/job/lo_ubsan/1236/>).
    
    Change-Id: I580f6fb3fb2f561b1cf76f8cf113bfe20aead844

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 );


More information about the Libreoffice-commits mailing list