From c8900890ad39e77285d284f5070abfe3661e493f Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 20 Sep 2020 15:14:18 +0100 Subject: crashtesting: assert on export of ooo123378-1.doc to docx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit since... commit d39651a69d789522b2faffd01879db25354b9a22 Date: Thu Aug 27 15:13:08 2020 +0300 sw: additional asserts/warns to diagnose empty style names though the triggering of undo/redo during layout looks super dubious to me Change-Id: Ie03fc7c1660a3c4fb77bfc0abb8373a5d5822378 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103073 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sw/source/filter/ww8/ww8graf.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index f7a048a7b35c..53f9739502eb 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -2826,8 +2826,13 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) MapWrapIntoFlyFormat(pRecord, pRetFrameFormat); // Set frame name with object name - if( pRetFrameFormat /*#i52825# */ && !aObjName.isEmpty() ) - pRetFrameFormat->SetName( aObjName ); + if (pRetFrameFormat /*#i52825# */) + { + if (!aObjName.isEmpty()) + pRetFrameFormat->SetName( aObjName ); + if (pRetFrameFormat->GetName().isEmpty()) + pRetFrameFormat->SetName(m_rDoc.GetUniqueDrawObjectName()); + } return AddAutoAnchor(pRetFrameFormat); } -- cgit