diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-08 14:02:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-08 21:03:52 +0100 |
commit | d8b500fc1c7a8ccee6a938463d74a570431a1480 (patch) | |
tree | a230dc52621654779fa94ac886d44c1d1ec92f1d | |
parent | 98d51bf8ce13bdac2d71f50f58d6d0ddb9041a4f (diff) |
simplify complex conditional
Change-Id: I56b9aaf752c3ae809a99b2e6897a929f7f4bbe8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129683
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/filter/html/htmlflywriter.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
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; |