39 const Reference< XComponentContext >& rxContext,
40 const Reference< XFrame >& rFrame,
65 Sequence<PropertyValue> aArgs{
73 uno::Reference< awt::XWindow > xWindow;
83 aPopup->InsertItem( sal_uInt16(
i+1 ), rLabel );
85 aPopup->CheckItem( sal_uInt16(
i+1 ) );
87 aPopup->CheckItem( sal_uInt16(
i+1 ),
false );
105 if ( rControlCommand.Command ==
"SetList" )
107 for (
auto const & arg : rControlCommand.Arguments )
109 if ( arg.Name ==
"List" )
111 Sequence< OUString > aList;
116 for ( OUString
const &
label : std::as_const(aList) )
123 uno::Sequence< beans::NamedValue > aInfo { {
"List", css::uno::Any(aList) } };
132 else if ( rControlCommand.Command ==
"CheckItemPos" )
134 for (
auto const & arg : rControlCommand.Arguments )
136 if ( arg.Name ==
"Pos" )
138 sal_Int32
nPos( -1 );
142 ( sal::static_int_cast< sal_uInt32 >(
nPos)
148 uno::Sequence< beans::NamedValue > aInfo { {
"ItemChecked", css::uno::Any(
nPos) } };
157 else if ( rControlCommand.Command ==
"AddEntry" )
160 OUString aTipHelpText;
162 for (
auto const & arg : rControlCommand.Arguments )
164 if ( arg.Name ==
"Text" )
168 else if ( arg.Name ==
"TipHelpText" )
170 arg.Value >>= aTipHelpText;
174 if (!aText.isEmpty())
181 else if ( rControlCommand.Command ==
"InsertEntry" )
186 for (
auto const & arg : rControlCommand.Arguments )
188 if ( arg.Name ==
"Pos" )
190 sal_Int32 nTmpPos = 0;
191 if ( arg.Value >>= nTmpPos )
193 if (( nTmpPos >= 0 ) && ( nTmpPos < nSize ))
197 else if ( arg.Name ==
"Text" )
205 aIter->mLabel = aText;
207 else if ( rControlCommand.Command ==
"RemoveEntryPos" )
209 for (
auto const & arg : rControlCommand.Arguments )
211 if ( arg.Name ==
"Pos" )
213 sal_Int32
nPos( -1 );
214 if ( arg.Value >>=
nPos )
225 else if ( rControlCommand.Command ==
"RemoveEntryText" )
227 for (
auto const & arg : rControlCommand.Arguments )
229 if ( arg.Name ==
"Text" )
232 if ( arg.Value >>= aText )
235 for ( sal_Int32 j = 0; j < nSize; j++ )
248 else if ( rControlCommand.Command ==
"createPopupMenu" )
258 sal_uInt16 nItemId = pMenu->GetCurItemId();
259 if ( nItemId > 0 && nItemId <= m_aDropdownMenuList.size() )
261 m_aCurrentSelection = m_aDropdownMenuList[nItemId-1].mLabel;
#define LINK(Instance, Class, Member)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
IMPL_LINK(WindowCommandDispatch, impl_notifyCommand, VclWindowEvent &, rEvent, void)