diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-07 12:59:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-08 06:01:50 +0100 |
commit | 1356892777b89b09ad7695e53d9e5ef1fca4f934 (patch) | |
tree | 2893a67fc9e8b520e4262e12ab5b91b28b9953c8 /xmlscript/source | |
parent | 1d1156b70d74033adecdb616c8276288785b84ac (diff) |
loplugin:fieldcast in xmlscript
Change-Id: Iecf8519ae43015a3ad850251a7027e22ce5bf836
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159082
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlscript/source')
-rw-r--r-- | xmlscript/source/xmldlg_imexp/imp_share.hxx | 4 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx index c05460ddf274..9eec588c48f3 100644 --- a/xmlscript/source/xmldlg_imexp/imp_share.hxx +++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx @@ -586,7 +586,7 @@ public: class ComboBoxElement : public ControlElement { - css::uno::Reference< css::xml::input::XElement > _popup; + rtl::Reference< MenuPopupElement > _popup; public: virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement( @@ -605,7 +605,7 @@ public: class MenuListElement : public ControlElement { - css::uno::Reference< css::xml::input::XElement > _popup; + rtl::Reference< MenuPopupElement > _popup; public: virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement( diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx index 03344a5b7c4a..e64e60eabb3d 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx @@ -1371,11 +1371,10 @@ void MenuListElement::endElement() bool bHasSrcRange = ctx.importDataAwareProperty( "source-cell-range" , _xAttributes ); if (_popup.is()) { - MenuPopupElement * p = static_cast< MenuPopupElement * >( _popup.get() ); if ( !bHasSrcRange ) - xControlModel->setPropertyValue( "StringItemList", Any( p->getItemValues() ) ); + xControlModel->setPropertyValue( "StringItemList", Any( _popup->getItemValues() ) ); if ( !bHasLinkedCell ) - xControlModel->setPropertyValue( "SelectedItems", Any( p->getSelectedItems() ) ); + xControlModel->setPropertyValue( "SelectedItems", Any( _popup->getSelectedItems() ) ); } ctx.importEvents( _events ); @@ -1441,8 +1440,7 @@ void ComboBoxElement::endElement() bool bHasSrcRange = ctx.importDataAwareProperty( "source-cell-range" , _xAttributes ); if (_popup.is() && !bHasSrcRange ) { - MenuPopupElement * p = static_cast< MenuPopupElement * >( _popup.get() ); - xControlModel->setPropertyValue( "StringItemList", Any( p->getItemValues() ) ); + xControlModel->setPropertyValue( "StringItemList", Any( _popup->getItemValues() ) ); } ctx.importEvents( _events ); |