diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-07 15:48:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-08 17:26:08 +0100 |
commit | e1d15b223ad741acc90690918ee43096b494b942 (patch) | |
tree | e18264fb826ea322865478336507783eb9edde3c /sw | |
parent | 0b8fd4aa900ac1e6102f4b2581cabbb1b81a7b13 (diff) |
loplugin:fieldcast in SwHTMLParser
Change-Id: Ie610358d3f9b1a1950edf617720ad13d4cfc57d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159129
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/html/htmldrawreader.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/html/htmltab.cxx | 1 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 1 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.hxx | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index 4e5cb320408a..fdbc187348e9 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -345,10 +345,10 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) // #i52858# - method name changed SwDrawModel* pModel = m_xDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel(); SdrPage* pPg = pModel->GetPage( 0 ); - m_pMarquee = SdrObjFactory::MakeNewObject( + m_pMarquee = static_cast<SdrTextObj*>(SdrObjFactory::MakeNewObject( *pModel, SdrInventor::Default, - SdrObjKind::Text); + SdrObjKind::Text).get()); if( !m_pMarquee ) return; @@ -533,13 +533,13 @@ void SwHTMLParser::EndMarquee() } // insert the collected text - static_cast<SdrTextObj*>(m_pMarquee.get())->SetText( m_aContents ); + m_pMarquee->SetText( m_aContents ); m_pMarquee->SetMergedItemSetAndBroadcast( m_pMarquee->GetMergedItemSet() ); if (m_bFixMarqueeWidth && !bFuzzing) { // adjust the size to the text - static_cast<SdrTextObj*>(m_pMarquee.get())->FitFrameToTextSize(); + m_pMarquee->FitFrameToTextSize(); } m_aContents.clear(); diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index e1e50865f624..8b4756986f27 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -36,6 +36,7 @@ #include <svl/numformat.hxx> #include <svl/urihelper.hxx> #include <svx/sdrobjectuser.hxx> +#include <svx/svdotext.hxx> #include <sal/log.hxx> #include <osl/diagnose.h> diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 17c0da4e25c2..01670a3d2220 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -31,6 +31,7 @@ #include <o3tl/safeint.hxx> #include <rtl/ustrbuf.hxx> #include <svx/svxids.hrc> +#include <svx/svdotext.hxx> #if OSL_DEBUG_LEVEL > 0 #include <stdlib.h> #endif diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index 1c88e8add932..33f03ecf3fc3 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -403,7 +403,7 @@ class SwHTMLParser : public SfxHTMLParser, public SvtListener std::vector<HTMLTable*> m_aTables; std::shared_ptr<HTMLTable> m_xTable; // current "outermost" table SwHTMLForm_Impl* m_pFormImpl; // current form - rtl::Reference<SdrObject> m_pMarquee; // current marquee + rtl::Reference<SdrTextObj> m_pMarquee; // current marquee std::unique_ptr<SwField> m_xField; // current field ImageMap *m_pImageMap; // current image map std::unique_ptr<ImageMaps> m_pImageMaps; ///< all Image-Maps that have been read |