96 std::u16string_view rContext,
97 std::u16string_view rModuleIdentifier )
99 return ( rContext.empty() || ( rContext.find( rModuleIdentifier ) != std::u16string_view::npos ));
118 const uno::Sequence< uno::Sequence< beans::PropertyValue > >& rSequence,
121 sal_Int32 nLen( rSequence.getLength() );
122 for ( sal_Int32
i = 0;
i < nLen;
i++ )
131 aAddonToolbarItem.
nWidth );
132 rContainer.push_back( aAddonToolbarItem );
181 const uno::Sequence< beans::PropertyValue >& rSequence,
182 OUString& rCommandURL,
186 OUString& rControlType,
189 for ( beans::PropertyValue
const & prop : rSequence )
192 prop.Value >>= rCommandURL;
194 prop.Value >>= rLabel;
196 prop.Value >>= rContext;
200 prop.Value >>= rControlType;
203 sal_Int32 aValue = 0;
204 prop.Value >>= aValue;
205 rWidth = sal_uInt16( aValue );
235 const ToolBox* pToolbar, sal_uInt16 nFirstItem,
236 std::u16string_view rReferencePoint )
242 const ToolBox::ImplToolItems::size_type nSize( pToolbar->
GetItemCount() );
244 for ( ToolBox::ImplToolItems::size_type
i = nFirstItem;
i < nSize;
i++ )
250 if ( rCmd == rReferencePoint )
310 ToolBox::ImplToolItems::size_type nPos,
313 std::u16string_view rModuleIdentifier,
314 std::u16string_view rMergeCommand,
315 std::u16string_view rMergeCommandParameter,
319 MergeItems( pToolbar,
nPos, 1, rItemId, rCommandMap, rModuleIdentifier, rItems );
321 MergeItems( pToolbar,
nPos, 0, rItemId, rCommandMap, rModuleIdentifier, rItems );
323 ReplaceItem( pToolbar,
nPos, rItemId, rCommandMap, rModuleIdentifier, rItems );
376 std::u16string_view rModuleIdentifier,
377 std::u16string_view rMergeCommand,
378 std::u16string_view rMergeFallback,
391 MergeItems( pToolbar, 0, 0, rItemId, rCommandMap, rModuleIdentifier, rItems );
436 ToolBox::ImplToolItems::size_type nPos,
437 sal_uInt16 nModIndex,
440 std::u16string_view rModuleIdentifier,
443 const sal_Int32 nSize( rAddonToolbarItems.size() );
445 for ( sal_Int32
i = 0;
i < nSize;
i++ )
450 ToolBox::ImplToolItems::size_type nInsPos =
nPos;
453 nInsPos += nModIndex+
i;
462 CommandToInfoMap::iterator pIter = rCommandMap.find( rItem.
aCommandURL );
463 if ( pIter == rCommandMap.end())
466 aCmdInfo.
nId = rItemId;
467 const CommandToInfoMap::value_type aValue( rItem.
aCommandURL, aCmdInfo );
468 rCommandMap.insert( aValue );
472 pIter->second.aIds.push_back( rItemId );
518 ToolBox::ImplToolItems::size_type nPos,
521 std::u16string_view rModuleIdentifier,
525 MergeItems( pToolbar,
nPos, 0, rItemId, rCommandMap, rModuleIdentifier, rAddonToolbarItems );
551 ToolBox::ImplToolItems::size_type nPos,
552 std::u16string_view rMergeCommandParameter )
559 if ( nPos < pToolbar->GetItemCount() )
591 const uno::Reference< uno::XComponentContext >& rxContext,
592 const uno::Reference< frame::XFrame > & xFrame,
594 const OUString& rCommandURL,
597 std::u16string_view rControlType )
const char16_t MERGECOMMAND_REPLACE[]
const char16_t TOOLBARCONTROLLER_SPINFIELD[]
const char TOOLBOXITEM_SEPARATOR_STR[]
const char16_t MERGEFALLBACK_ADDFIRST[]
const char MERGE_TOOLBAR_URL[]
const char MERGE_TOOLBAR_WIDTH[]
const char16_t TOOLBARCONTROLLER_TOGGLEDDBTN[]
const char MERGE_TOOLBAR_TITLE[]
const char16_t TOOLBARCONTROLLER_DROPDOWNBOX[]
::std::vector< AddonToolbarItem > AddonToolbarItemContainer
std::unordered_map< OUString, CommandInfo > CommandToInfoMap
const char MERGE_TOOLBAR_CONTEXT[]
const char16_t TOOLBARCONTROLLER_FIXEDIMAGE[]
const char16_t TOOLBARCONTROLLER_COMBOBOX[]
const char16_t MERGEFALLBACK_IGNORE[]
const char16_t MERGEFALLBACK_ADDLAST[]
const char16_t TOOLBARCONTROLLER_IMGBUTTON[]
const char16_t TOOLBARCONTROLLER_EDIT[]
const char MERGE_TOOLBAR_CONTROLTYPE[]
const char16_t MERGECOMMAND_ADDAFTER[]
const char MERGE_TOOLBAR_TARGET[]
const char16_t TOOLBARCONTROLLER_DROPDOWNBTN[]
const char16_t MERGECOMMAND_REMOVE[]
const char16_t TOOLBARCONTROLLER_BUTTON[]
const char16_t MERGECOMMAND_ADDBEFORE[]
const char16_t TOOLBARCONTROLLER_FIXEDTEXT[]
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
Reference< XFrame > xFrame