20#include <com/sun/star/beans/PropertyValue.hpp>
27#include <com/sun/star/uno/Any.hxx>
28#include <com/sun/star/uno/Sequence.hxx>
29#include <rtl/ustrbuf.hxx>
41#include <unordered_map>
57#define PROPERTYNAME_URL ADDONSMENUITEM_STRING_URL
58#define PROPERTYNAME_TITLE ADDONSMENUITEM_STRING_TITLE
59#define PROPERTYNAME_TARGET ADDONSMENUITEM_STRING_TARGET
60#define PROPERTYNAME_IMAGEIDENTIFIER ADDONSMENUITEM_STRING_IMAGEIDENTIFIER
61#define PROPERTYNAME_CONTEXT ADDONSMENUITEM_STRING_CONTEXT
62#define PROPERTYNAME_SUBMENU ADDONSMENUITEM_STRING_SUBMENU
69#define INDEX_IMAGEIDENTIFIER 2
71#define INDEX_CONTEXT 4
72#define INDEX_SUBMENU 5
73#define INDEX_CONTROLTYPE 6
76#define INDEX_AUTOSIZE 9
77#define INDEX_OWNERDRAW 10
78#define INDEX_MANDATORY 11
80#define PROPERTYCOUNT_INDEX 13
83#define PROPERTYCOUNT_MENUITEM 6
84#define OFFSET_MENUITEM_URL 0
85#define OFFSET_MENUITEM_TITLE 1
86#define OFFSET_MENUITEM_IMAGEIDENTIFIER 2
87#define OFFSET_MENUITEM_TARGET 3
88#define OFFSET_MENUITEM_CONTEXT 4
89#define OFFSET_MENUITEM_SUBMENU 5
92#define PROPERTYCOUNT_POPUPMENU 4
93#define OFFSET_POPUPMENU_TITLE 0
94#define OFFSET_POPUPMENU_CONTEXT 1
95#define OFFSET_POPUPMENU_SUBMENU 2
96#define OFFSET_POPUPMENU_URL 3
99#define PROPERTYCOUNT_TOOLBARITEM 7
100#define OFFSET_TOOLBARITEM_URL 0
101#define OFFSET_TOOLBARITEM_TITLE 1
102#define OFFSET_TOOLBARITEM_IMAGEIDENTIFIER 2
103#define OFFSET_TOOLBARITEM_TARGET 3
104#define OFFSET_TOOLBARITEM_CONTEXT 4
105#define OFFSET_TOOLBARITEM_CONTROLTYPE 5
106#define OFFSET_TOOLBARITEM_WIDTH 6
109#define PROPERTYCOUNT_NOTEBOOKBARITEM 8
110#define OFFSET_NOTEBOOKBARITEM_URL 0
111#define OFFSET_NOTEBOOKBARITEM_TITLE 1
112#define OFFSET_NOTEBOOKBARITEM_IMAGEIDENTIFIER 2
113#define OFFSET_NOTEBOOKBARITEM_TARGET 3
114#define OFFSET_NOTEBOOKBARITEM_CONTEXT 4
115#define OFFSET_NOTEBOOKBARITEM_CONTROLTYPE 5
116#define OFFSET_NOTEBOOKBARITEM_WIDTH 6
117#define OFFSET_NOTEBOOKBARITEM_STYLE 7
120#define PROPERTYCOUNT_STATUSBARITEM 8
121#define OFFSET_STATUSBARITEM_URL 0
122#define OFFSET_STATUSBARITEM_TITLE 1
123#define OFFSET_STATUSBARITEM_CONTEXT 2
124#define OFFSET_STATUSBARITEM_ALIGN 3
125#define OFFSET_STATUSBARITEM_AUTOSIZE 4
126#define OFFSET_STATUSBARITEM_OWNERDRAW 5
127#define OFFSET_STATUSBARITEM_MANDATORY 6
128#define OFFSET_STATUSBARITEM_WIDTH 7
131#define PROPERTYCOUNT_IMAGES 8
132#define PROPERTYCOUNT_EMBEDDED_IMAGES 2
133#define OFFSET_IMAGES_SMALL 0
134#define OFFSET_IMAGES_BIG 1
135#define OFFSET_IMAGES_SMALLHC 2
136#define OFFSET_IMAGES_BIGHC 3
137#define OFFSET_IMAGES_SMALL_URL 4
138#define OFFSET_IMAGES_BIG_URL 5
139#define OFFSET_IMAGES_SMALLHC_URL 6
140#define OFFSET_IMAGES_BIGHC_URL 7
142#define PROPERTYCOUNT_MERGE_MENUBAR 6
143#define OFFSET_MERGEMENU_MERGEPOINT 0
144#define OFFSET_MERGEMENU_MERGECOMMAND 1
145#define OFFSET_MERGEMENU_MERGECOMMANDPARAMETER 2
146#define OFFSET_MERGEMENU_MERGEFALLBACK 3
147#define OFFSET_MERGEMENU_MERGECONTEXT 4
148#define OFFSET_MERGEMENU_MENUITEMS 5
150#define PROPERTYCOUNT_MERGE_TOOLBAR 7
151#define OFFSET_MERGETOOLBAR_TOOLBAR 0
152#define OFFSET_MERGETOOLBAR_MERGEPOINT 1
153#define OFFSET_MERGETOOLBAR_MERGECOMMAND 2
154#define OFFSET_MERGETOOLBAR_MERGECOMMANDPARAMETER 3
155#define OFFSET_MERGETOOLBAR_MERGEFALLBACK 4
156#define OFFSET_MERGETOOLBAR_MERGECONTEXT 5
157#define OFFSET_MERGETOOLBAR_TOOLBARITEMS 6
159#define PROPERTYCOUNT_MERGE_NOTEBOOKBAR 7
160#define OFFSET_MERGENOTEBOOKBAR_NOTEBOOKBAR 0
161#define OFFSET_MERGENOTEBOOKBAR_MERGEPOINT 1
162#define OFFSET_MERGENOTEBOOKBAR_MERGECOMMAND 2
163#define OFFSET_MERGENOTEBOOKBAR_MERGECOMMANDPARAMETER 3
164#define OFFSET_MERGENOTEBOOKBAR_MERGEFALLBACK 4
165#define OFFSET_MERGENOTEBOOKBAR_MERGECONTEXT 5
166#define OFFSET_MERGENOTEBOOKBAR_NOTEBOOKBARITEMS 6
168#define PROPERTYCOUNT_MERGE_STATUSBAR 6
169#define OFFSET_MERGESTATUSBAR_MERGEPOINT 0
170#define OFFSET_MERGESTATUSBAR_MERGECOMMAND 1
171#define OFFSET_MERGESTATUSBAR_MERGECOMMANDPARAMETER 2
172#define OFFSET_MERGESTATUSBAR_MERGEFALLBACK 3
173#define OFFSET_MERGESTATUSBAR_MERGECONTEXT 4
174#define OFFSET_MERGESTATUSBAR_STATUSBARITEMS 5
210 virtual void Notify(
const Sequence< OUString >& lPropertyNames )
override;
278 void ReadAddonMenuSet( Sequence< Sequence< PropertyValue > >& aAddonMenuSeq );
281 bool ReadToolBarItemSet(
const OUString& rToolBarItemSetNodeName, Sequence< Sequence< PropertyValue > >& aAddonOfficeToolBarSeq );
283 bool ReadNotebookBarItemSet(
const OUString& rNotebookBarItemSetNodeName, Sequence< Sequence< PropertyValue > >& aAddonOfficeNotebookBarSeq );
285 void ReadOfficeHelpSet( Sequence< Sequence< PropertyValue > >& aAddonOfficeHelpMenuSeq );
292 void ReadMergeMenuData( std::u16string_view aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeMenu );
293 void ReadMergeToolbarData( std::u16string_view aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeToolbarItems );
294 void ReadMergeNotebookBarData( std::u16string_view aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeNotebookBarItems );
295 void ReadMergeStatusbarData( std::u16string_view aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeStatusbar );
296 bool ReadMenuItem( std::u16string_view aMenuItemNodeName, Sequence< PropertyValue >& aMenuItem,
bool bIgnoreSubMenu =
false );
297 bool ReadPopupMenu( std::u16string_view aPopupMenuNodeName, Sequence< PropertyValue >& aPopupMenu );
298 void AppendPopupMenu( Sequence< PropertyValue >& aTargetPopupMenu,
const Sequence< PropertyValue >& rSourcePopupMenu );
299 bool ReadToolBarItem( std::u16string_view aToolBarItemNodeName, Sequence< PropertyValue >& aToolBarItem );
300 bool ReadNotebookBarItem( std::u16string_view aNotebookBarItemNodeName, Sequence< PropertyValue >& aNotebookBarItem );
302 bool ReadStatusBarItem( std::u16string_view aStatusbarItemNodeName, Sequence< PropertyValue >& aStatusbarItem );
303 std::unique_ptr<ImageEntry>
ReadImageData( std::u16string_view aImagesNodeName );
309 void ReadSubMenuEntries(
const Sequence< OUString >& aSubMenuNodeNames, Sequence< Sequence< PropertyValue > >& rSubMenu );
358 aSizeEntry[
static_cast<int>(eSize)].aImage = rImage;
363 aSizeEntry[
static_cast<int>(eSize)].
aURL = rURL;
435 Sequence<OUString> aNotifySeq {
"AddonUI" };
436 EnableNotification( aNotifySeq );
443 assert(!IsModified());
488 SAL_WARN(
"fwk",
"AddonsOptions_Impl::ImplCommit(): Not implemented yet!");
555 const OUString& rToolbarName,
561 rToolbarInstructions = pIter->second;
571 const OUString& rNotebookBarName,
577 rNotebookBarInstructions = pIter->second;
590 SAL_INFO(
"fwk",
"Addons: expensive scale image from "
592 aScaleBmp.
Scale(aSize, BmpScaleFlag::BestQuality);
600 SAL_INFO(
"fwk",
"Expensive: Addons GetImageFromURL " <<
aURL <<
601 " big " << (bBig?
"big":
"little") <<
602 " scale " << (bNoScale ?
"noscale" :
"scale"));
608 int nIdx =
static_cast<int>(eSize);
609 int nOtherIdx = nIdx ? 0 : 1;
612 OneImageEntry& rOtherEntry = pIter->second.aSizeEntry[nOtherIdx];
620 rSizeEntry.
aImage = aImage;
622 SAL_WARN(
"fwk",
"failed to load addons image " <<
aURL);
627 if (aImage.
IsEmpty() && bNoScale)
628 aImage = rSizeEntry.
aImage;
635 aImage = rSizeEntry.
aImage;
637 aImage = rOtherEntry.
aImage;
650 OUString aAddonMenuNodeName(
"AddonUI/AddonMenu" );
651 Sequence< OUString > aAddonMenuNodeSeq = GetNodeNames( aAddonMenuNodeName );
654 sal_uInt32
nCount = aAddonMenuNodeSeq.getLength();
657 auto pMenuItem = aMenuItem.getArray();
666 for ( sal_uInt32
n = 0;
n <
nCount;
n++ )
668 OUString aRootMenuItemNode( aAddonMenuItemNode + aAddonMenuNodeSeq[
n] );
674 sal_uInt32 nMenuItemCount = rAddonMenuSeq.getLength() + 1;
675 rAddonMenuSeq.realloc( nMenuItemCount );
676 rAddonMenuSeq.getArray()[
nIndex++] = aMenuItem;
684 OUString aAddonHelpMenuNodeName(
"AddonUI/OfficeHelp" );
685 Sequence< OUString > aAddonHelpMenuNodeSeq = GetNodeNames( aAddonHelpMenuNodeName );
686 OUString aAddonHelpMenuItemNode( aAddonHelpMenuNodeName +
m_aPathDelimiter );
688 sal_uInt32
nCount = aAddonHelpMenuNodeSeq.getLength();
691 auto pMenuItem = aMenuItem.getArray();
700 for ( sal_uInt32
n = 0;
n <
nCount;
n++ )
702 OUString aRootMenuItemNode( aAddonHelpMenuItemNode + aAddonHelpMenuNodeSeq[
n] );
705 if (
ReadMenuItem( aRootMenuItemNode, aMenuItem,
true ) )
708 sal_uInt32 nMenuItemCount = rAddonOfficeHelpMenuSeq.getLength() + 1;
709 rAddonOfficeHelpMenuSeq.realloc( nMenuItemCount );
710 rAddonOfficeHelpMenuSeq.getArray()[
nIndex++] = aMenuItem;
718 OUString aAddonMenuBarNodeName(
"AddonUI/OfficeMenuBar" );
719 Sequence< OUString > aAddonMenuBarNodeSeq = GetNodeNames( aAddonMenuBarNodeName );
722 sal_uInt32
nCount = aAddonMenuBarNodeSeq.getLength();
725 auto pPopupMenu = aPopupMenu.getArray();
733 auto pAddonOfficeMenuBarSeq = rAddonOfficeMenuBarSeq.getArray();
734 for ( sal_uInt32
n = 0;
n <
nCount;
n++ )
736 OUString aPopupMenuNode( aAddonMenuBarNode + aAddonMenuBarNodeSeq[
n] );
742 OUString aPopupTitle;
745 StringToIndexMap::const_iterator pIter = aTitleToIndexMap.find( aPopupTitle );
746 if ( pIter != aTitleToIndexMap.end() )
749 Sequence< PropertyValue >& rOldPopupMenu = pAddonOfficeMenuBarSeq[pIter->second];
755 sal_uInt32 nMenuItemCount = rAddonOfficeMenuBarSeq.getLength() + 1;
756 rAddonOfficeMenuBarSeq.realloc( nMenuItemCount );
757 pAddonOfficeMenuBarSeq = rAddonOfficeMenuBarSeq.getArray();
758 pAddonOfficeMenuBarSeq[
nIndex] = aPopupMenu;
759 aTitleToIndexMap.emplace( aPopupTitle,
nIndex );
770 OUString aAddonToolBarNodeName(
"AddonUI/OfficeToolBar" );
771 Sequence< OUString > aAddonToolBarNodeSeq = GetNodeNames( aAddonToolBarNodeName );
774 sal_uInt32
nCount = aAddonToolBarNodeSeq.getLength();
776 for ( sal_uInt32
n = 0;
n <
nCount;
n++ )
778 OUString aToolBarItemNode( aAddonToolBarNode + aAddonToolBarNodeSeq[
n] );
779 rAddonOfficeToolBarResNames.push_back( aAddonToolBarNodeSeq[
n] );
787 sal_uInt32 nToolBarItemCount = rAddonOfficeToolBarSeq.getLength();
788 OUString aAddonToolBarItemSetNode( rToolBarItemSetNodeName +
m_aPathDelimiter );
789 Sequence< OUString > aAddonToolBarItemSetNodeSeq = GetNodeNames( rToolBarItemSetNodeName );
791 auto pToolBarItem = aToolBarItem.getArray();
801 sal_uInt32
nCount = aAddonToolBarItemSetNodeSeq.getLength();
802 for ( sal_uInt32
n = 0;
n <
nCount;
n++ )
804 OUString aToolBarItemNode( aAddonToolBarItemSetNode + aAddonToolBarItemSetNodeSeq[
n] );
810 sal_uInt32 nAddonCount = rAddonOfficeToolBarSeq.getLength();
811 rAddonOfficeToolBarSeq.realloc( nAddonCount+1 );
812 rAddonOfficeToolBarSeq.getArray()[nAddonCount] = aToolBarItem;
821 std::vector<OUString>& rAddonOfficeNotebookBarResNames)
824 OUString aAddonNotebookBarNodeName(
"AddonUI/OfficeNotebookBar");
825 Sequence<OUString> aAddonNotebookBarNodeSeq = GetNodeNames(aAddonNotebookBarNodeName);
826 OUString aAddonNotebookBarNode(aAddonNotebookBarNodeName +
m_aPathDelimiter);
828 sal_uInt32
nCount = aAddonNotebookBarNodeSeq.getLength();
832 OUString aNotebookBarItemNode(aAddonNotebookBarNode + aAddonNotebookBarNodeSeq[
n]);
833 rAddonOfficeNotebookBarResNames.push_back(aAddonNotebookBarNodeSeq[
n]);
840 const OUString& rNotebookBarItemSetNodeName,
841 Sequence<Sequence<PropertyValue>>& rAddonOfficeNotebookBarSeq)
843 sal_uInt32 nNotebookBarItemCount = rAddonOfficeNotebookBarSeq.getLength();
844 OUString aAddonNotebookBarItemSetNode(rNotebookBarItemSetNodeName +
m_aPathDelimiter);
845 Sequence<OUString> aAddonNotebookBarItemSetNodeSeq = GetNodeNames(rNotebookBarItemSetNodeName);
847 auto pNotebookBarItem = aNotebookBarItem.getArray();
859 sal_uInt32
nCount = aAddonNotebookBarItemSetNodeSeq.getLength();
862 OUString aNotebookBarItemNode(aAddonNotebookBarItemSetNode
863 + aAddonNotebookBarItemSetNodeSeq[
n]);
868 sal_uInt32 nAddonCount = rAddonOfficeNotebookBarSeq.getLength();
869 rAddonOfficeNotebookBarSeq.realloc(nAddonCount + 1);
870 rAddonOfficeNotebookBarSeq.getArray()[nAddonCount] = aNotebookBarItem;
875 > nNotebookBarItemCount);
881 OUString aAddonImagesNodeName(
"AddonUI/Images" );
882 Sequence< OUString > aAddonImagesNodeSeq = GetNodeNames( aAddonImagesNodeName );
885 sal_uInt32
nCount = aAddonImagesNodeSeq.getLength();
890 for ( sal_uInt32
n = 0;
n <
nCount;
n++ )
892 OUString aImagesItemNode( aAddonImagesNode + aAddonImagesNodeSeq[
n] );
895 Sequence< OUString > aAddonImageItemNodePropNames = { aImagesItemNode +
899 Sequence< Any > aAddonImageItemNodeValues = GetProperties( aAddonImageItemNodePropNames );
903 if (( aAddonImageItemNodeValues[0] >>=
aURL ) &&
907 OUString aImagesUserDefinedItemNode = aImagesItemNode +
913 std::unique_ptr<ImageEntry> pImageEntry =
ReadImageData( aImagesUserDefinedItemNode );
917 aImageManager.emplace(
aURL, std::move(*pImageEntry) );
931 static constexpr OUStringLiteral aMenuMergeRootName(
u"AddonUI/OfficeMenuBarMerging/" );
933 Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aMenuMergeRootName );
935 sal_uInt32
nCount = aAddonMergeNodesSeq.getLength();
938 Sequence< OUString > aNodePropNames( 5 );
939 auto pNodePropNames = aNodePropNames.getArray();
941 for ( sal_uInt32
i = 0;
i <
nCount;
i++ )
943 OUString aMergeAddonInstructions( aMenuMergeRootName + aAddonMergeNodesSeq[
i] );
945 Sequence< OUString > aAddonInstMergeNodesSeq = GetNodeNames( aMergeAddonInstructions );
946 sal_uInt32 nCountAddons = aAddonInstMergeNodesSeq.getLength();
948 for ( sal_uInt32 j = 0; j < nCountAddons; j++ )
950 OUString aMergeAddonInstructionBase = aMergeAddonInstructions +
952 aAddonInstMergeNodesSeq[j] +
956 pNodePropNames[0] = aMergeAddonInstructionBase +
959 pNodePropNames[1] = aMergeAddonInstructionBase +
962 pNodePropNames[2] = aMergeAddonInstructionBase +
965 pNodePropNames[3] = aMergeAddonInstructionBase +
968 pNodePropNames[4] = aMergeAddonInstructionBase +
971 Sequence< Any > aNodePropValues = GetProperties( aNodePropNames );
974 aNodePropValues[0] >>= aMergeMenuInstruction.
aMergePoint;
982 aContainer.push_back( aMergeMenuInstruction );
991 Sequence< OUString > aSubMenuNodeNames = GetNodeNames( aMergeMenuBaseNode );
995 for ( OUString& rName : asNonConstRange(aSubMenuNodeNames) )
996 rName = aMergeMenuBaseNode + rName;
1003 static constexpr OUStringLiteral aToolbarMergeRootName(
u"AddonUI/OfficeToolbarMerging/" );
1005 Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aToolbarMergeRootName );
1006 sal_uInt32
nCount = aAddonMergeNodesSeq.getLength();
1009 Sequence< OUString > aNodePropNames( 6 );
1010 auto pNodePropNames = aNodePropNames.getArray();
1012 for ( sal_uInt32
i = 0;
i <
nCount;
i++ )
1014 OUString aMergeAddonInstructions( aToolbarMergeRootName + aAddonMergeNodesSeq[
i] );
1016 Sequence< OUString > aAddonInstMergeNodesSeq = GetNodeNames( aMergeAddonInstructions );
1017 sal_uInt32 nCountAddons = aAddonInstMergeNodesSeq.getLength();
1019 for ( sal_uInt32 j = 0; j < nCountAddons; j++ )
1021 OUString aMergeAddonInstructionBase = aMergeAddonInstructions +
1023 aAddonInstMergeNodesSeq[j] +
1027 pNodePropNames[0] = aMergeAddonInstructionBase +
1030 pNodePropNames[1] = aMergeAddonInstructionBase +
1033 pNodePropNames[2] = aMergeAddonInstructionBase +
1036 pNodePropNames[3] = aMergeAddonInstructionBase +
1039 pNodePropNames[4] = aMergeAddonInstructionBase +
1042 pNodePropNames[5] = aMergeAddonInstructionBase +
1045 Sequence< Any > aNodePropValues = GetProperties( aNodePropNames );
1048 aNodePropValues[0] >>= aMergeToolbarInstruction.
aMergeToolbar;
1049 aNodePropValues[1] >>= aMergeToolbarInstruction.
aMergePoint;
1050 aNodePropValues[2] >>= aMergeToolbarInstruction.
aMergeCommand;
1053 aNodePropValues[5] >>= aMergeToolbarInstruction.
aMergeContext;
1059 rVector.push_back( aMergeToolbarInstruction );
1066 OUString aMergeToolbarBaseNode = aMergeAddonInstructionBase +
1075 static constexpr OUStringLiteral aNotebookBarMergeRootName(
u"AddonUI/OfficeNotebookBarMerging/");
1077 Sequence<OUString> aAddonMergeNodesSeq = GetNodeNames(aNotebookBarMergeRootName);
1078 sal_uInt32
nCount = aAddonMergeNodesSeq.getLength();
1081 Sequence<OUString> aNodePropNames(6);
1082 auto pNodePropNames = aNodePropNames.getArray();
1086 OUString aMergeAddonInstructions(aNotebookBarMergeRootName + aAddonMergeNodesSeq[
i]);
1088 Sequence<OUString> aAddonInstMergeNodesSeq = GetNodeNames(aMergeAddonInstructions);
1089 sal_uInt32 nCountAddons = aAddonInstMergeNodesSeq.getLength();
1091 for (sal_uInt32 j = 0; j < nCountAddons; j++)
1093 OUString aMergeAddonInstructionBase = aMergeAddonInstructions +
1095 aAddonInstMergeNodesSeq[j] +
1099 pNodePropNames[0] = aMergeAddonInstructionBase +
1102 pNodePropNames[1] = aMergeAddonInstructionBase +
1105 pNodePropNames[2] = aMergeAddonInstructionBase +
1108 pNodePropNames[3] = aMergeAddonInstructionBase +
1111 pNodePropNames[4] = aMergeAddonInstructionBase +
1114 pNodePropNames[5] = aMergeAddonInstructionBase +
1117 Sequence<Any> aNodePropValues = GetProperties(aNodePropNames);
1121 aNodePropValues[1] >>= aMergeNotebookBarInstruction.
aMergePoint;
1122 aNodePropValues[2] >>= aMergeNotebookBarInstruction.
aMergeCommand;
1124 aNodePropValues[4] >>= aMergeNotebookBarInstruction.
aMergeFallback;
1125 aNodePropValues[5] >>= aMergeNotebookBarInstruction.
aMergeContext;
1131 = rCachedNotebookBarMergingInstructions[aMergeNotebookBarInstruction
1133 rVector.push_back(aMergeNotebookBarInstruction);
1139 std::u16string_view aMergeAddonInstructionBase,
1140 Sequence<Sequence<PropertyValue>>& rMergeNotebookBarItems)
1142 OUString aMergeNotebookBarBaseNode = aMergeAddonInstructionBase +
1150 static constexpr OUStringLiteral aStatusbarMergeRootName(
u"AddonUI/OfficeStatusbarMerging/" );
1152 Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aStatusbarMergeRootName );
1153 sal_uInt32
nCount = aAddonMergeNodesSeq.getLength();
1155 Sequence< OUString > aNodePropNames( 5 );
1156 auto pNodePropNames = aNodePropNames.getArray();
1158 for ( sal_uInt32
i = 0;
i <
nCount;
i++ )
1160 OUString aMergeAddonInstructions( aStatusbarMergeRootName + aAddonMergeNodesSeq[
i] );
1162 Sequence< OUString > aAddonInstMergeNodesSeq = GetNodeNames( aMergeAddonInstructions );
1163 sal_uInt32 nCountAddons = aAddonInstMergeNodesSeq.getLength();
1165 for ( sal_uInt32 j = 0; j < nCountAddons; j++ )
1167 OUString aMergeAddonInstructionBase = aMergeAddonInstructions +
1169 aAddonInstMergeNodesSeq[j] +
1173 pNodePropNames[0] = aMergeAddonInstructionBase +
1176 pNodePropNames[1] = aMergeAddonInstructionBase +
1179 pNodePropNames[2] = aMergeAddonInstructionBase +
1182 pNodePropNames[3] = aMergeAddonInstructionBase +
1185 pNodePropNames[4] = aMergeAddonInstructionBase +
1188 Sequence< Any > aNodePropValues = GetProperties( aNodePropNames );
1191 aNodePropValues[0] >>= aMergeStatusbarInstruction.
aMergePoint;
1192 aNodePropValues[1] >>= aMergeStatusbarInstruction.
aMergeCommand;
1195 aNodePropValues[4] >>= aMergeStatusbarInstruction.
aMergeContext;
1200 aContainer.push_back( aMergeStatusbarInstruction );
1206 std::u16string_view aMergeAddonInstructionBase,
1207 Sequence< Sequence< PropertyValue > >& rMergeStatusbarItems )
1209 OUString aMergeStatusbarBaseNode = aMergeAddonInstructionBase +
1212 OUString aAddonStatusbarItemSetNode( aMergeStatusbarBaseNode +
m_aPathDelimiter );
1213 Sequence< OUString > aAddonStatusbarItemSetNodeSeq = GetNodeNames( aMergeStatusbarBaseNode );
1216 auto pStatusbarItem = aStatusbarItem.getArray();
1226 sal_uInt32
nCount = aAddonStatusbarItemSetNodeSeq.getLength();
1227 for ( sal_uInt32
n = 0;
n <
nCount;
n++ )
1229 OUString aStatusbarItemNode( aAddonStatusbarItemSetNode + aAddonStatusbarItemSetNodeSeq[
n] );
1233 sal_uInt32 nAddonCount = rMergeStatusbarItems.getLength();
1234 rMergeStatusbarItems.realloc( nAddonCount+1 );
1235 rMergeStatusbarItems.getArray()[nAddonCount] = aStatusbarItem;
1241 std::u16string_view aStatusarItemNodeName,
1242 Sequence< PropertyValue >& aStatusbarItem )
1244 bool bResult(
false );
1246 OUString aAddonStatusbarItemTreeNode( aStatusarItemNodeName +
m_aPathDelimiter );
1253 auto pStatusbarItem = aStatusbarItem.getArray();
1275 bool bResult =
false;
1282 auto pMenuItem = aMenuItem.getArray();
1286 Sequence< OUString > aRootSubMenuNodeNames = GetNodeNames( aRootSubMenuName );
1287 if ( aRootSubMenuNodeNames.hasElements() && !bIgnoreSubMenu )
1291 OUString aPopupMenuImageId;
1304 Sequence< Sequence< PropertyValue > > aSubMenuSeq;
1306 for ( OUString& rName : asNonConstRange(aRootSubMenuNodeNames) )
1307 rName = aSubMenuRootNodeName + rName;
1312 else if (( aMenuItemNodePropValues[
OFFSET_MENUITEM_URL ] >>= aStrValue ) && !aStrValue.isEmpty() )
1315 OUString aMenuImageId;
1332 auto pMenuItem = aMenuItem.getArray();
1348 bool bResult =
false;
1354 !aStrValue.isEmpty() )
1356 auto pPopupMenu = aPopupMenu.getArray();
1360 Sequence< OUString > aRootSubMenuNodeNames = GetNodeNames( aRootSubMenuName );
1361 if ( aRootSubMenuNodeNames.hasElements() )
1371 Sequence< Sequence< PropertyValue > > aSubMenuSeq;
1373 for ( OUString& rName : asNonConstRange(aRootSubMenuNodeNames) )
1374 rName = aSubMenuRootNodeName + rName;
1386 Sequence< Sequence< PropertyValue > > aTargetSubMenuSeq;
1387 Sequence< Sequence< PropertyValue > > aSourceSubMenuSeq;
1392 sal_uInt32
nIndex = aTargetSubMenuSeq.getLength();
1393 aTargetSubMenuSeq.realloc(
nIndex + aSourceSubMenuSeq.getLength() );
1394 auto pTargetSubMenuSeq = aTargetSubMenuSeq.getArray();
1395 for ( Sequence<PropertyValue>
const & rSeq : std::as_const(aSourceSubMenuSeq) )
1396 pTargetSubMenuSeq[
nIndex++] = rSeq;
1403 bool bResult =
false;
1405 OUString aAddonToolBarItemTreeNode( aToolBarItemNodeName +
m_aPathDelimiter );
1415 auto pToolBarItem = aToolBarItem.getArray();
1430 auto pToolBarItem = aToolBarItem.getArray();
1460 bool bResult =
false;
1462 OUString aAddonNotebookBarItemTreeNode( aNotebookBarItemNodeName +
m_aPathDelimiter );
1472 auto pNotebookBarItem = aNotebookBarItem.getArray();
1488 auto pNotebookBarItem = aNotebookBarItem.getArray();
1520 auto pMenuItem = aMenuItem.getArray();
1531 sal_uInt32
nCount = aSubMenuNodeNames.getLength();
1532 for ( sal_uInt32
n = 0;
n <
nCount;
n++ )
1536 sal_uInt32 nSubMenuCount = rSubMenuSeq.getLength() + 1;
1537 rSubMenuSeq.realloc( nSubMenuCount );
1538 rSubMenuSeq.getArray()[
nIndex++] = aMenuItem;
1560 std::unique_ptr<SvStream> pStream = UcbStreamHelper::CreateStream( aImageURL, StreamMode::STD_READ );
1561 if ( pStream && ( pStream->GetErrorCode() ==
ERRCODE_NONE ))
1587 if ( aImageId.isEmpty() )
1591 OUString aImageURL( aImageId );
1596 static const char* aExtArray[] = {
"_16",
"_26" };
1599 OUStringBuffer aFileURL( aImageURL );
1600 aFileURL.appendAscii( aExtArray[
i] );
1601 aFileURL.append(
".bmp" );
1612 Sequence< Any > aPropertyData;
1613 Sequence< sal_Int8 > aImageDataSeq;
1616 std::unique_ptr<ImageEntry> pEntry;
1620 aPropertyData = GetProperties( aImageDataNodeNames );
1627 if (( aPropertyData[
i] >>= aImageDataSeq ) &&
1628 aImageDataSeq.hasElements() &&
1643 if (aPropertyData[
i] >>= aImageURL)
1656 bool bResult =
false;
1658 if ( rBitmapDataSeq.hasElements() )
1660 SvMemoryStream aMemStream( rBitmapDataSeq.getArray(), rBitmapDataSeq.getLength(), StreamMode::STD_READ );
1679 auto plResult = lResult.getArray();
1696 auto plResult = lResult.getArray();
1709 auto plResult = lResult.getArray();
1726 auto plResult = lResult.getArray();
1742 std::u16string_view aPropertyRootNode )
const
1745 auto plResult = lResult.getArray();
1762 auto plResult = lResult.getArray();
1779 std::weak_ptr<AddonsOptions_Impl> g_pAddonsOptions;
1782AddonsOptions::AddonsOptions()
1785 MutexGuard aGuard( GetOwnStaticMutex() );
1787 m_pImpl = g_pAddonsOptions.lock();
1790 m_pImpl = std::make_shared<AddonsOptions_Impl>();
1795AddonsOptions::~AddonsOptions()
1798 MutexGuard aGuard( GetOwnStaticMutex() );
1805bool AddonsOptions::HasAddonsMenu()
const
1807 MutexGuard aGuard( GetOwnStaticMutex() );
1808 return m_pImpl->HasAddonsMenu();
1813sal_Int32 AddonsOptions::GetAddonsToolBarCount()
const
1815 MutexGuard aGuard( GetOwnStaticMutex() );
1816 return m_pImpl->GetAddonsToolBarCount();
1821sal_Int32 AddonsOptions::GetAddonsNotebookBarCount()
const
1823 MutexGuard aGuard( GetOwnStaticMutex() );
1824 return m_pImpl->GetAddonsNotebookBarCount();
1829const Sequence< Sequence< PropertyValue > >& AddonsOptions::GetAddonsMenu()
const
1831 MutexGuard aGuard( GetOwnStaticMutex() );
1832 return m_pImpl->GetAddonsMenu();
1837const Sequence< Sequence< PropertyValue > >& AddonsOptions::GetAddonsMenuBarPart()
const
1839 MutexGuard aGuard( GetOwnStaticMutex() );
1840 return m_pImpl->GetAddonsMenuBarPart();
1845const Sequence< Sequence< PropertyValue > >& AddonsOptions::GetAddonsToolBarPart( sal_uInt32 nIndex )
const
1847 MutexGuard aGuard( GetOwnStaticMutex() );
1848 return m_pImpl->GetAddonsToolBarPart( nIndex );
1853const Sequence< Sequence< PropertyValue > >& AddonsOptions::GetAddonsNotebookBarPart( sal_uInt32 nIndex )
const
1855 MutexGuard aGuard( GetOwnStaticMutex() );
1856 return m_pImpl->GetAddonsNotebookBarPart( nIndex );
1861OUString AddonsOptions::GetAddonsToolbarResourceName( sal_uInt32 nIndex )
const
1863 MutexGuard aGuard( GetOwnStaticMutex() );
1864 return m_pImpl->GetAddonsToolbarResourceName( nIndex );
1869OUString AddonsOptions::GetAddonsNotebookBarResourceName( sal_uInt32 nIndex )
const
1871 MutexGuard aGuard( GetOwnStaticMutex() );
1872 return m_pImpl->GetAddonsNotebookBarResourceName( nIndex );
1877const Sequence< Sequence< PropertyValue > >& AddonsOptions::GetAddonsHelpMenu()
const
1879 MutexGuard aGuard( GetOwnStaticMutex() );
1880 return m_pImpl->GetAddonsHelpMenu();
1887 MutexGuard aGuard( GetOwnStaticMutex() );
1888 return m_pImpl->GetMergeMenuInstructions();
1893bool AddonsOptions::GetMergeToolbarInstructions(
1894 const OUString& rToolbarName,
1897 MutexGuard aGuard( GetOwnStaticMutex() );
1898 return m_pImpl->GetMergeToolbarInstructions(
1899 rToolbarName, rToolbarInstructions );
1904bool AddonsOptions::GetMergeNotebookBarInstructions(
1905 const OUString& rNotebookBarName,
1908 MutexGuard aGuard( GetOwnStaticMutex() );
1909 return m_pImpl->GetMergeNotebookBarInstructions(
1910 rNotebookBarName, rNotebookBarInstructions );
1917 MutexGuard aGuard( GetOwnStaticMutex() );
1918 return m_pImpl->GetMergeStatusbarInstructions();
1923BitmapEx AddonsOptions::GetImageFromURL(
const OUString& aURL,
bool bBig,
bool bNoScale )
const
1925 MutexGuard aGuard( GetOwnStaticMutex() );
1926 return m_pImpl->GetImageFromURL( aURL, bBig, bNoScale );
1931BitmapEx AddonsOptions::GetImageFromURL(
const OUString& aURL,
bool bBig )
const
1933 return GetImageFromURL( aURL, bBig,
false );
1936Mutex& AddonsOptions::GetOwnStaticMutex()
1939 static Mutex ourMutex;
1946 MutexGuard aGuard(AddonsOptions::GetOwnStaticMutex());
1947 ReadConfigurationData();
#define OFFSET_TOOLBARITEM_IMAGEIDENTIFIER
#define OFFSET_MERGENOTEBOOKBAR_MERGEFALLBACK
#define OFFSET_MENUITEM_TARGET
#define PROPERTYNAME_TITLE
#define OFFSET_MERGETOOLBAR_TOOLBAR
#define OFFSET_MERGESTATUSBAR_MERGECONTEXT
#define OFFSET_MERGETOOLBAR_TOOLBARITEMS
constexpr OUStringLiteral SEPARATOR_URL
#define OFFSET_MERGEMENU_MERGEPOINT
#define OFFSET_MENUITEM_CONTEXT
#define OFFSET_MERGENOTEBOOKBAR_MERGECOMMAND
#define OFFSET_IMAGES_BIG
#define OFFSET_STATUSBARITEM_OWNERDRAW
#define OFFSET_NOTEBOOKBARITEM_TARGET
#define OFFSET_MERGETOOLBAR_MERGECOMMANDPARAMETER
#define OFFSET_POPUPMENU_CONTEXT
#define OFFSET_MERGETOOLBAR_MERGECOMMAND
constexpr OUStringLiteral ROOTNODE_ADDONMENU
#define OFFSET_MERGETOOLBAR_MERGEPOINT
#define OFFSET_MERGETOOLBAR_MERGECONTEXT
#define OFFSET_MERGENOTEBOOKBAR_MERGEPOINT
#define OFFSET_TOOLBARITEM_CONTEXT
constexpr OUStringLiteral PATHDELIMITER
#define OFFSET_TOOLBARITEM_URL
#define OFFSET_STATUSBARITEM_AUTOSIZE
#define OFFSET_NOTEBOOKBARITEM_TITLE
#define INDEX_CONTROLTYPE
#define OFFSET_STATUSBARITEM_MANDATORY
#define OFFSET_IMAGES_BIG_URL
#define OFFSET_TOOLBARITEM_WIDTH
#define PROPERTYCOUNT_POPUPMENU
#define PROPERTYCOUNT_STATUSBARITEM
#define OFFSET_NOTEBOOKBARITEM_STYLE
#define PROPERTYCOUNT_MENUITEM
#define OFFSET_MERGEMENU_MERGECOMMANDPARAMETER
#define OFFSET_POPUPMENU_URL
#define OFFSET_MERGESTATUSBAR_MERGEPOINT
#define OFFSET_MERGENOTEBOOKBAR_NOTEBOOKBAR
#define OFFSET_STATUSBARITEM_TITLE
#define OFFSET_NOTEBOOKBARITEM_WIDTH
#define OFFSET_MENUITEM_TITLE
#define OFFSET_STATUSBARITEM_URL
#define OFFSET_MERGEMENU_MERGEFALLBACK
constexpr OUStringLiteral IMAGES_NODENAME
#define PROPERTYCOUNT_TOOLBARITEM
#define OFFSET_IMAGES_SMALLHC
#define OFFSET_MERGEMENU_MERGECOMMAND
#define OFFSET_MERGESTATUSBAR_MERGEFALLBACK
#define OFFSET_MERGENOTEBOOKBAR_MERGECONTEXT
#define OFFSET_MENUITEM_URL
#define OFFSET_MENUITEM_SUBMENU
#define PROPERTYCOUNT_MERGE_NOTEBOOKBAR
#define OFFSET_MERGETOOLBAR_MERGEFALLBACK
#define PROPERTYNAME_TARGET
#define OFFSET_POPUPMENU_SUBMENU
#define OFFSET_IMAGES_SMALL
#define OFFSET_TOOLBARITEM_TARGET
#define PROPERTYNAME_SUBMENU
#define OFFSET_NOTEBOOKBARITEM_IMAGEIDENTIFIER
#define PROPERTYCOUNT_INDEX
#define OFFSET_MERGENOTEBOOKBAR_NOTEBOOKBARITEMS
#define INDEX_IMAGEIDENTIFIER
#define PROPERTYCOUNT_IMAGES
#define OFFSET_MERGEMENU_MERGECONTEXT
#define OFFSET_STATUSBARITEM_ALIGN
#define OFFSET_TOOLBARITEM_TITLE
#define PROPERTYNAME_CONTEXT
#define OFFSET_NOTEBOOKBARITEM_URL
#define OFFSET_STATUSBARITEM_CONTEXT
#define OFFSET_MERGESTATUSBAR_MERGECOMMAND
#define OFFSET_IMAGES_BIGHC
#define PROPERTYCOUNT_MERGE_TOOLBAR
#define OFFSET_IMAGES_SMALL_URL
#define OFFSET_MERGESTATUSBAR_MERGECOMMANDPARAMETER
#define OFFSET_TOOLBARITEM_CONTROLTYPE
#define OFFSET_NOTEBOOKBARITEM_CONTEXT
#define PROPERTYNAME_IMAGEIDENTIFIER
#define OFFSET_IMAGES_SMALLHC_URL
#define OFFSET_IMAGES_BIGHC_URL
#define OFFSET_MERGEMENU_MENUITEMS
#define OFFSET_POPUPMENU_TITLE
#define OFFSET_NOTEBOOKBARITEM_CONTROLTYPE
#define OFFSET_MERGENOTEBOOKBAR_MERGECOMMANDPARAMETER
#define PROPERTYCOUNT_MERGE_MENUBAR
#define PROPERTYCOUNT_EMBEDDED_IMAGES
#define OFFSET_MERGESTATUSBAR_STATUSBARITEMS
#define PROPERTYCOUNT_NOTEBOOKBARITEM
#define OFFSET_MENUITEM_IMAGEIDENTIFIER
#define PROPERTYCOUNT_MERGE_STATUSBAR
#define OFFSET_STATUSBARITEM_WIDTH
constexpr OUStringLiteral ADDONSPOPUPMENU_URL_PREFIX_STR
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
bool Scale(const Size &rNewSize, BmpScaleFlag nScaleFlag=BmpScaleFlag::Default)
Bitmap GetBitmap(Color aTransparentReplaceColor) const
const Size & GetSizePixel() const
static GraphicFilter & GetGraphicFilter()
ErrCode ImportGraphic(Graphic &rGraphic, const INetURLObject &rPath, sal_uInt16 nFormat=GRFILTER_FORMAT_DONTKNOW, sal_uInt16 *pDeterminedFormat=nullptr, GraphicFilterImportFlags nImportFlags=GraphicFilterImportFlags::NONE)
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
Sequence< OUString > GetPropertyNamesImages(std::u16string_view aPropertyRootNode) const
std::unordered_map< OUString, MergeToolbarInstructionContainer > ToolbarMergingInstructions
AddonNotebookBars m_aCachedNotebookBarPartProperties
ToolbarMergingInstructions m_aCachedToolbarMergingInstructions
const Sequence< Sequence< PropertyValue > > & GetAddonsNotebookBarPart(sal_uInt32 nIndex) const
void ReadMergeStatusbarData(std::u16string_view aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > > &rMergeStatusbar)
void ReadImages(ImageManager &aImageManager)
virtual void ImplCommit() override
Sequence< Sequence< PropertyValue > > m_aEmptyAddonNotebookBar
Sequence< OUString > GetPropertyNamesPopupMenu(std::u16string_view aPropertyRootNode) const
MergeStatusbarInstructionContainer m_aCachedStatusbarMergingInstructions
bool ReadStatusBarItem(std::u16string_view aStatusbarItemNodeName, Sequence< PropertyValue > &aStatusbarItem)
void ReadToolbarMergeInstructions(ToolbarMergingInstructions &rToolbarMergeMap)
const Sequence< Sequence< PropertyValue > > & GetAddonsHelpMenu() const
void ReadAddonMenuSet(Sequence< Sequence< PropertyValue > > &aAddonMenuSeq)
Sequence< OUString > GetPropertyNamesToolBarItem(std::u16string_view aPropertyRootNode) const
bool ReadNotebookBarItem(std::u16string_view aNotebookBarItemNodeName, Sequence< PropertyValue > &aNotebookBarItem)
virtual void Notify(const Sequence< OUString > &lPropertyNames) override
Sequence< Sequence< PropertyValue > > m_aCachedHelpMenuProperties
AddonToolBars m_aCachedToolBarPartProperties
OUString m_aPropMergeToolbarNames[PROPERTYCOUNT_MERGE_TOOLBAR]
Sequence< Sequence< PropertyValue > > m_aCachedMenuProperties
void ReadMergeMenuData(std::u16string_view aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > > &rMergeMenu)
bool HasAddonsMenu() const
std::unordered_map< OUString, MergeNotebookBarInstructionContainer > NotebookBarMergingInstructions
std::vector< OUString > m_aCachedToolBarPartResourceNames
bool GetMergeNotebookBarInstructions(const OUString &rNotebookBarName, MergeNotebookBarInstructionContainer &rNotebookBarInstructions) const
OUString GeneratePrefixURL()
virtual ~AddonsOptions_Impl() override
void ReadSubMenuEntries(const Sequence< OUString > &aSubMenuNodeNames, Sequence< Sequence< PropertyValue > > &rSubMenu)
const Sequence< Sequence< PropertyValue > > & GetAddonsToolBarPart(sal_uInt32 nIndex) const
void ReadConfigurationData()
Sequence< Sequence< PropertyValue > > m_aEmptyAddonToolBar
bool ReadToolBarItemSet(const OUString &rToolBarItemSetNodeName, Sequence< Sequence< PropertyValue > > &aAddonOfficeToolBarSeq)
BitmapEx GetImageFromURL(const OUString &aURL, bool bBig, bool bNoScale)
OUString m_aPropImagesNames[PROPERTYCOUNT_IMAGES]
const MergeStatusbarInstructionContainer & GetMergeStatusbarInstructions() const
OUString m_aPropMergeStatusbarNames[PROPERTYCOUNT_MERGE_STATUSBAR]
bool HasAssociatedImages(const OUString &aURL)
ImageManager m_aImageManager
MergeMenuInstructionContainer m_aCachedMergeMenuInsContainer
void ReadAndAssociateImages(const OUString &aURL, const OUString &aImageId)
OUString m_aPropMergeNotebookBarNames[PROPERTYCOUNT_MERGE_NOTEBOOKBAR]
OUString m_aRootAddonPopupMenuURLPrexfix
OUString m_aPropNames[PROPERTYCOUNT_INDEX]
OUString m_aPropMergeMenuNames[PROPERTYCOUNT_MERGE_MENUBAR]
OUString GetAddonsToolbarResourceName(sal_uInt32 nIndex) const
void ReadOfficeHelpSet(Sequence< Sequence< PropertyValue > > &aAddonOfficeHelpMenuSeq)
std::unique_ptr< ImageEntry > ReadImageData(std::u16string_view aImagesNodeName)
void ReadOfficeToolBarSet(AddonToolBars &rAddonOfficeToolBars, std::vector< OUString > &rAddonOfficeToolBarResNames)
OUString GetAddonsNotebookBarResourceName(sal_uInt32 nIndex) const
bool ReadToolBarItem(std::u16string_view aToolBarItemNodeName, Sequence< PropertyValue > &aToolBarItem)
DECL_LINK(NotifyEvent, void *, void)
std::unordered_map< OUString, sal_uInt32 > StringToIndexMap
Sequence< OUString > GetPropertyNamesNotebookBarItem(std::u16string_view aPropertyRootNode) const
void SubstituteVariables(OUString &aURL)
sal_Int32 m_nRootAddonPopupMenuId
BitmapEx ReadImageFromURL(const OUString &aURL)
void ReadStatusbarMergeInstructions(MergeStatusbarInstructionContainer &rContainer)
Sequence< OUString > GetPropertyNamesMenuItem(std::u16string_view aPropertyRootNode) const
bool GetMergeToolbarInstructions(const OUString &rToolbarName, MergeToolbarInstructionContainer &rToolbarInstructions) const
void ReadMenuMergeInstructions(MergeMenuInstructionContainer &rContainer)
void ReadOfficeMenuBarSet(Sequence< Sequence< PropertyValue > > &aAddonOfficeMenuBarSeq)
sal_Int32 GetAddonsToolBarCount() const
void AppendPopupMenu(Sequence< PropertyValue > &aTargetPopupMenu, const Sequence< PropertyValue > &rSourcePopupMenu)
sal_Int32 GetAddonsNotebookBarCount() const
std::vector< Sequence< Sequence< PropertyValue > > > AddonToolBars
std::vector< OUString > m_aCachedNotebookBarPartResourceNames
Sequence< Sequence< PropertyValue > > m_aCachedMenuBarPartProperties
OUString m_aPathDelimiter
Sequence< OUString > GetPropertyNamesStatusbarItem(std::u16string_view aPropertyRootNode) const
const MergeMenuInstructionContainer & GetMergeMenuInstructions() const
void ReadOfficeNotebookBarSet(AddonNotebookBars &rAddonOfficeNotebookBars, std::vector< OUString > &rAddonOfficeNotebookBarResNames)
const Sequence< Sequence< PropertyValue > > & GetAddonsMenu() const
NotebookBarMergingInstructions m_aCachedNotebookBarMergingInstructions
bool ReadMenuItem(std::u16string_view aMenuItemNodeName, Sequence< PropertyValue > &aMenuItem, bool bIgnoreSubMenu=false)
void ReadMergeToolbarData(std::u16string_view aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > > &rMergeToolbarItems)
std::unordered_map< OUString, ImageEntry > ImageManager
bool CreateImageFromSequence(BitmapEx &rImage, Sequence< sal_Int8 > &rBitmapDataSeq) const
bool ReadPopupMenu(std::u16string_view aPopupMenuNodeName, Sequence< PropertyValue > &aPopupMenu)
const Sequence< Sequence< PropertyValue > > & GetAddonsMenuBarPart() const
std::vector< Sequence< Sequence< PropertyValue > > > AddonNotebookBars
void ReadNotebookBarMergeInstructions(NotebookBarMergingInstructions &rNotebookBarMergeMap)
void ReadMergeNotebookBarData(std::u16string_view aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > > &rMergeNotebookBarItems)
bool ReadNotebookBarItemSet(const OUString &rNotebookBarItemSetNodeName, Sequence< Sequence< PropertyValue > > &aAddonOfficeNotebookBarSeq)
constexpr ::Color COL_LIGHTMAGENTA(0xFF, 0x00, 0xFF)
#define LINK(Instance, Class, Member)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
#define SAL_N_ELEMENTS(arr)
COMPHELPER_DLLPUBLIC OUString getExpandedUri(css::uno::Reference< css::uno::XComponentContext > const &context, OUString const &uri)
Reference< XComponentContext > getProcessComponentContext()
::std::vector< MergeToolbarInstruction > MergeToolbarInstructionContainer
::std::vector< MergeMenuInstruction > MergeMenuInstructionContainer
static BitmapEx ScaleImage(const BitmapEx &rImage, bool bBig)
::std::vector< MergeStatusbarInstruction > MergeStatusbarInstructionContainer
IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback, LinkParamNone *, void)
asynchronous callback @descr We start all actions inside this object asynchronous (see comments there...
::std::vector< MergeNotebookBarInstruction > MergeNotebookBarInstructionContainer
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
void addImage(ImageSize eSize, const BitmapEx &rImage)
OneImageEntry aSizeEntry[2]
OUString aURL
URL in case it is not loaded yet.
BitmapEx aScaled
cached scaled image
BitmapEx aImage
original un-scaled image
OUString aMergeNotebookBar
css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > aMergeNotebookBarItems
OUString aMergeCommandParameter
css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > aMergeStatusbarItems
OUString aMergeCommandParameter