sw/source/filter/html/htmlflywriter.cxx |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit d8b500fc1c7a8ccee6a938463d74a570431a1480
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Feb 8 14:02:53 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Feb 8 21:03:52 2022 +0100

    simplify complex conditional
    
    Change-Id: I56b9aaf752c3ae809a99b2e6897a929f7f4bbe8b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129683
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/filter/html/htmlflywriter.cxx 
b/sw/source/filter/html/htmlflywriter.cxx
index e9fe0d12d4b3..05c0ad6f847f 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -1009,10 +1009,12 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& 
aHtml, const SwFrameForma
     // Insert wrap for graphics that are anchored to a paragraph as
     // <BR CLEAR=...> in the string
 
-    if( !((nFrameOptions & HtmlFrmOpts::BrClear) &&
-        ((RndStdIds::FLY_AT_PARA == rFrameFormat.GetAnchor().GetAnchorId()) ||
-         (RndStdIds::FLY_AT_CHAR == rFrameFormat.GetAnchor().GetAnchorId())) &&
-        SfxItemState::SET == rItemSet.GetItemState( RES_SURROUND, true, &pItem 
)))
+    if( !(nFrameOptions & HtmlFrmOpts::BrClear) )
+        return;
+    RndStdIds nAnchorId = rFrameFormat.GetAnchor().GetAnchorId();
+    if (RndStdIds::FLY_AT_PARA != nAnchorId && RndStdIds::FLY_AT_CHAR != 
nAnchorId)
+        return;
+    if( SfxItemState::SET != rItemSet.GetItemState( RES_SURROUND, true, &pItem 
) )
         return;
 
     const char* pSurroundString = nullptr;

Reply via email to