diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-05-02 17:09:24 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-05-02 18:21:46 +0200 |
commit | da50aaff5324661cbc7b4513ba249d9ed58f3626 (patch) | |
tree | af70183c6ac456d455af8ffda4c85c131fd90917 /sw | |
parent | 1aaa884edb23612b9fa2cb3f78c6d7149c2b4de3 (diff) |
Avoid unneeded cast
Change-Id: I8ab52af3b53e3da5f4dd006674c0392fcce46987
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151291
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/html/htmlatr.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/html/htmlflywriter.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/html/htmlplug.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/html/wrthtml.hxx | 4 |
4 files changed, 9 insertions, 10 deletions
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 385869c737af..84d2feb1ad5b 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -2922,8 +2922,7 @@ static SwHTMLWriter& OutHTML_SwFlyCnt( SwHTMLWriter& rWrt, const SfxPoolItem& rH const SwFrameFormat& rFormat = *rFlyCnt.GetFrameFormat(); const SdrObject *pSdrObj = nullptr; - SwHTMLFrameType eType = - static_cast<SwHTMLFrameType>(rWrt.GuessFrameType( rFormat, pSdrObj )); + SwHTMLFrameType eType = rWrt.GuessFrameType( rFormat, pSdrObj ); AllHtmlFlags nMode = aHTMLOutFrameAsCharTable[eType][rWrt.m_nExportMode]; rWrt.OutFrameFormat( nMode, rFormat, pSdrObj ); return rWrt; diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index faa5f1067b33..1fb4d1a65ef2 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -158,7 +158,7 @@ HTMLOutEvent const aIMapEventTable[] = { nullptr, nullptr, SvMacroItemId::NONE } }; -sal_uInt16 SwHTMLWriter::GuessFrameType( const SwFrameFormat& rFrameFormat, +SwHTMLFrameType SwHTMLWriter::GuessFrameType( const SwFrameFormat& rFrameFormat, const SdrObject*& rpSdrObj ) { SwHTMLFrameType eType; @@ -205,7 +205,7 @@ sal_uInt16 SwHTMLWriter::GuessFrameType( const SwFrameFormat& rFrameFormat, else if( pNd->IsOLENode() ) { // applet, plugin, floating frame - eType = static_cast<SwHTMLFrameType>(GuessOLENodeFrameType( *pNd )); + eType = GuessOLENodeFrameType( *pNd ); } else { @@ -282,7 +282,7 @@ sal_uInt16 SwHTMLWriter::GuessFrameType( const SwFrameFormat& rFrameFormat, } } - return static_cast< sal_uInt16 >(eType); + return eType; } void SwHTMLWriter::CollectFlyFrames() @@ -299,7 +299,7 @@ void SwHTMLWriter::CollectFlyFrames() const SdrObject *pSdrObj = nullptr; const SwNode *pAnchorNode; const SwContentNode *pACNd; - SwHTMLFrameType eType = static_cast<SwHTMLFrameType>(GuessFrameType( rFrameFormat, pSdrObj )); + SwHTMLFrameType eType = GuessFrameType( rFrameFormat, pSdrObj ); AllHtmlFlags nMode; const SwFormatAnchor& rAnchor = rFrameFormat.GetAnchor(); diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 9b43f079d4fb..74c8f1b7a958 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -1190,7 +1190,7 @@ void SwHTMLParser::InsertFloatingFrame() ++m_nFloatingFrames; } -sal_uInt16 SwHTMLWriter::GuessOLENodeFrameType( const SwNode& rNode ) +SwHTMLFrameType SwHTMLWriter::GuessOLENodeFrameType( const SwNode& rNode ) { SwHTMLFrameType eType = HTML_FRMTYPE_OLE; @@ -1215,7 +1215,7 @@ sal_uInt16 SwHTMLWriter::GuessOLENodeFrameType( const SwNode& rNode ) } #endif - return static_cast< sal_uInt16 >(eType); + return eType; } SwHTMLWriter& OutHTML_FrameFormatOLENode( SwHTMLWriter& rWrt, const SwFrameFormat& rFrameFormat, diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index f65803149ea1..801b90363b72 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -544,9 +544,9 @@ public: static sal_uInt32 ToPixel( sal_uInt32 nVal, const bool bVert ); - sal_uInt16 GuessFrameType( const SwFrameFormat& rFrameFormat, + SwHTMLFrameType GuessFrameType( const SwFrameFormat& rFrameFormat, const SdrObject*& rpStrObj ); - static sal_uInt16 GuessOLENodeFrameType( const SwNode& rNd ); + static SwHTMLFrameType GuessOLENodeFrameType( const SwNode& rNd ); void CollectFlyFrames(); |