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>
This commit is contained in:
parent
1d1156b70d
commit
1356892777
2 changed files with 5 additions and 7 deletions
|
@ -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(
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue