summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/htmlflywriter.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-02-08 14:02:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-02-08 21:03:52 +0100
commitd8b500fc1c7a8ccee6a938463d74a570431a1480 (patch)
treea230dc52621654779fa94ac886d44c1d1ec92f1d /sw/source/filter/html/htmlflywriter.cxx
parent98d51bf8ce13bdac2d71f50f58d6d0ddb9041a4f (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>
Diffstat (limited to 'sw/source/filter/html/htmlflywriter.cxx')
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx10
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;