addonsoptions.cxx (fdaa53df) addonsoptions.cxx (bb0b5665)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 50 unchanged lines hidden (view full) ---

59using namespace ::com::sun::star::uno ;
60using namespace ::com::sun::star::beans ;
61using namespace ::com::sun::star::lang ;
62
63//_________________________________________________________________________________________________________________
64// const
65//_________________________________________________________________________________________________________________
66
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 50 unchanged lines hidden (view full) ---

59using namespace ::com::sun::star::uno ;
60using namespace ::com::sun::star::beans ;
61using namespace ::com::sun::star::lang ;
62
63//_________________________________________________________________________________________________________________
64// const
65//_________________________________________________________________________________________________________________
66
67#define STR_TOOLBARITEMS "ToolBarItems"
68
67#define ROOTNODE_ADDONMENU ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Addons" ))
68#define PATHDELIMITER ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/" ))
69#define ROOTNODE_ADDONMENU ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Addons" ))
70#define PATHDELIMITER ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/" ))
69#define TOOLBARITEMS ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ToolBarItems" ))
71#define TOOLBARITEMS ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(STR_TOOLBARITEMS))
70#define SEPARATOR_URL_STR "private:separator"
71#define SEPARATOR_URL_LEN 17
72#define SEPARATOR_URL ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SEPARATOR_URL_STR ))
73
74#define PROPERTYNAME_URL ADDONSMENUITEM_PROPERTYNAME_URL
75#define PROPERTYNAME_TITLE ADDONSMENUITEM_PROPERTYNAME_TITLE
76#define PROPERTYNAME_TARGET ADDONSMENUITEM_PROPERTYNAME_TARGET
77#define PROPERTYNAME_IMAGEIDENTIFIER ADDONSMENUITEM_PROPERTYNAME_IMAGEIDENTIFIER
78#define PROPERTYNAME_CONTEXT ADDONSMENUITEM_PROPERTYNAME_CONTEXT
79#define PROPERTYNAME_SUBMENU ADDONSMENUITEM_PROPERTYNAME_SUBMENU
80#define PROPERTYNAME_CONTROLTYPE ADDONSMENUITEM_PROPERTYNAME_CONTROLTYPE
81#define PROPERTYNAME_WIDTH ADDONSMENUITEM_PROPERTYNAME_WIDTH
72#define SEPARATOR_URL_STR "private:separator"
73#define SEPARATOR_URL_LEN 17
74#define SEPARATOR_URL ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SEPARATOR_URL_STR ))
75
76#define PROPERTYNAME_URL ADDONSMENUITEM_PROPERTYNAME_URL
77#define PROPERTYNAME_TITLE ADDONSMENUITEM_PROPERTYNAME_TITLE
78#define PROPERTYNAME_TARGET ADDONSMENUITEM_PROPERTYNAME_TARGET
79#define PROPERTYNAME_IMAGEIDENTIFIER ADDONSMENUITEM_PROPERTYNAME_IMAGEIDENTIFIER
80#define PROPERTYNAME_CONTEXT ADDONSMENUITEM_PROPERTYNAME_CONTEXT
81#define PROPERTYNAME_SUBMENU ADDONSMENUITEM_PROPERTYNAME_SUBMENU
82#define PROPERTYNAME_CONTROLTYPE ADDONSMENUITEM_PROPERTYNAME_CONTROLTYPE
83#define PROPERTYNAME_WIDTH ADDONSMENUITEM_PROPERTYNAME_WIDTH
84#define PROPERTYNAME_TOOLBARITEMS TOOLBARITEMS
82
83#define PROPERTYNAME_ALIGN STATUSBARITEM_PROPERTYNAME_ALIGN
84#define PROPERTYNAME_AUTOSIZE STATUSBARITEM_PROPERTYNAME_AUTOSIZE
85#define PROPERTYNAME_OWNERDRAW STATUSBARITEM_PROPERTYNAME_OWNERDRAW
86
87#define PROPERTYNAME_IMAGESMALL ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageSmall" ))
88#define PROPERTYNAME_IMAGEBIG ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageBig" ))
89#define PROPERTYNAME_IMAGESMALLHC ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageSmallHC" ))

--- 15 unchanged lines hidden (view full) ---

105#define MERGEMENU_MERGEPOINT_SEPARATOR '\\'
106
107#define PROPERTYNAME_MERGETOOLBAR_TOOLBAR ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeToolBar" ))
108#define PROPERTYNAME_MERGETOOLBAR_MERGEPOINT ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergePoint" ))
109#define PROPERTYNAME_MERGETOOLBAR_MERGECOMMAND ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeCommand" ))
110#define PROPERTYNAME_MERGETOOLBAR_MERGECOMMANDPARAMETER ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeCommandParameter" ))
111#define PROPERTYNAME_MERGETOOLBAR_MERGEFALLBACK ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeFallback" ))
112#define PROPERTYNAME_MERGETOOLBAR_MERGECONTEXT ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeContext" ))
85
86#define PROPERTYNAME_ALIGN STATUSBARITEM_PROPERTYNAME_ALIGN
87#define PROPERTYNAME_AUTOSIZE STATUSBARITEM_PROPERTYNAME_AUTOSIZE
88#define PROPERTYNAME_OWNERDRAW STATUSBARITEM_PROPERTYNAME_OWNERDRAW
89
90#define PROPERTYNAME_IMAGESMALL ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageSmall" ))
91#define PROPERTYNAME_IMAGEBIG ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageBig" ))
92#define PROPERTYNAME_IMAGESMALLHC ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageSmallHC" ))

--- 15 unchanged lines hidden (view full) ---

108#define MERGEMENU_MERGEPOINT_SEPARATOR '\\'
109
110#define PROPERTYNAME_MERGETOOLBAR_TOOLBAR ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeToolBar" ))
111#define PROPERTYNAME_MERGETOOLBAR_MERGEPOINT ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergePoint" ))
112#define PROPERTYNAME_MERGETOOLBAR_MERGECOMMAND ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeCommand" ))
113#define PROPERTYNAME_MERGETOOLBAR_MERGECOMMANDPARAMETER ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeCommandParameter" ))
114#define PROPERTYNAME_MERGETOOLBAR_MERGEFALLBACK ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeFallback" ))
115#define PROPERTYNAME_MERGETOOLBAR_MERGECONTEXT ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeContext" ))
113#define PROPERTYNAME_MERGETOOLBAR_TOOLBARITEMS ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ToolBarItems" ))
116#define PROPERTYNAME_MERGETOOLBAR_TOOLBARITEMS ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(STR_TOOLBARITEMS ))
114
115#define PROPERTYNAME_MERGESTATUSBAR_MERGEPOINT ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergePoint" ))
116#define PROPERTYNAME_MERGESTATUSBAR_MERGECOMMAND ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeCommand" ))
117#define PROPERTYNAME_MERGESTATUSBAR_MERGECOMMANDPARAMETER ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeCommandParameter" ))
118#define PROPERTYNAME_MERGESTATUSBAR_MERGEFALLBACK ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeFallback" ))
119#define PROPERTYNAME_MERGESTATUSBAR_MERGECONTEXT ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeContext" ))
120#define PROPERTYNAME_MERGESTATUSBAR_STATUSBARITEMS ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StatusBarItems" ))
121

--- 4 unchanged lines hidden (view full) ---

126#define INDEX_TARGET 3
127#define INDEX_CONTEXT 4
128#define INDEX_SUBMENU 5
129#define INDEX_CONTROLTYPE 6
130#define INDEX_WIDTH 7
131#define INDEX_ALIGN 8
132#define INDEX_AUTOSIZE 9
133#define INDEX_OWNERDRAW 10
117
118#define PROPERTYNAME_MERGESTATUSBAR_MERGEPOINT ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergePoint" ))
119#define PROPERTYNAME_MERGESTATUSBAR_MERGECOMMAND ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeCommand" ))
120#define PROPERTYNAME_MERGESTATUSBAR_MERGECOMMANDPARAMETER ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeCommandParameter" ))
121#define PROPERTYNAME_MERGESTATUSBAR_MERGEFALLBACK ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeFallback" ))
122#define PROPERTYNAME_MERGESTATUSBAR_MERGECONTEXT ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MergeContext" ))
123#define PROPERTYNAME_MERGESTATUSBAR_STATUSBARITEMS ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StatusBarItems" ))
124

--- 4 unchanged lines hidden (view full) ---

129#define INDEX_TARGET 3
130#define INDEX_CONTEXT 4
131#define INDEX_SUBMENU 5
132#define INDEX_CONTROLTYPE 6
133#define INDEX_WIDTH 7
134#define INDEX_ALIGN 8
135#define INDEX_AUTOSIZE 9
136#define INDEX_OWNERDRAW 10
134#define PROPERTYCOUNT_INDEX 11
137#define INDEX_TOOLBARITEMS 11
138#define PROPERTYCOUNT_INDEX 12
135
136// The following order is mandatory. Please add properties at the end!
137#define PROPERTYCOUNT_MENUITEM 6
138#define OFFSET_MENUITEM_URL 0
139#define OFFSET_MENUITEM_TITLE 1
140#define OFFSET_MENUITEM_IMAGEIDENTIFIER 2
141#define OFFSET_MENUITEM_TARGET 3
142#define OFFSET_MENUITEM_CONTEXT 4
143#define OFFSET_MENUITEM_SUBMENU 5
144
145// The following order is mandatory. Please add properties at the end!
146#define PROPERTYCOUNT_POPUPMENU 4
147#define OFFSET_POPUPMENU_TITLE 0
148#define OFFSET_POPUPMENU_CONTEXT 1
149#define OFFSET_POPUPMENU_SUBMENU 2
150#define OFFSET_POPUPMENU_URL 3 // Used for property set
151
152// The following order is mandatory. Please add properties at the end!
139
140// The following order is mandatory. Please add properties at the end!
141#define PROPERTYCOUNT_MENUITEM 6
142#define OFFSET_MENUITEM_URL 0
143#define OFFSET_MENUITEM_TITLE 1
144#define OFFSET_MENUITEM_IMAGEIDENTIFIER 2
145#define OFFSET_MENUITEM_TARGET 3
146#define OFFSET_MENUITEM_CONTEXT 4
147#define OFFSET_MENUITEM_SUBMENU 5
148
149// The following order is mandatory. Please add properties at the end!
150#define PROPERTYCOUNT_POPUPMENU 4
151#define OFFSET_POPUPMENU_TITLE 0
152#define OFFSET_POPUPMENU_CONTEXT 1
153#define OFFSET_POPUPMENU_SUBMENU 2
154#define OFFSET_POPUPMENU_URL 3 // Used for property set
155
156// The following order is mandatory. Please add properties at the end!
157#define PROPERTYCOUNT_TOOLBAR 2
158#define OFFSET_TOOLBAR_TITLE 0
159#define OFFSET_TOOLBAR_TOOLBARITEMS 1
160
161// The following order is mandatory. Please add properties at the end!
153#define PROPERTYCOUNT_TOOLBARITEM 7
154#define OFFSET_TOOLBARITEM_URL 0
155#define OFFSET_TOOLBARITEM_TITLE 1
156#define OFFSET_TOOLBARITEM_IMAGEIDENTIFIER 2
157#define OFFSET_TOOLBARITEM_TARGET 3
158#define OFFSET_TOOLBARITEM_CONTEXT 4
159#define OFFSET_TOOLBARITEM_CONTROLTYPE 5
160#define OFFSET_TOOLBARITEM_WIDTH 6

--- 130 unchanged lines hidden (view full) ---

291
292 sal_Bool HasAddonsMenu () const ;
293 sal_Bool HasAddonsHelpMenu () const ;
294 sal_Int32 GetAddonsToolBarCount() const ;
295 const Sequence< Sequence< PropertyValue > >& GetAddonsMenu () const ;
296 const Sequence< Sequence< PropertyValue > >& GetAddonsMenuBarPart () const ;
297 const Sequence< Sequence< PropertyValue > >& GetAddonsToolBarPart ( sal_uInt32 nIndex ) const ;
298 const ::rtl::OUString GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const;
162#define PROPERTYCOUNT_TOOLBARITEM 7
163#define OFFSET_TOOLBARITEM_URL 0
164#define OFFSET_TOOLBARITEM_TITLE 1
165#define OFFSET_TOOLBARITEM_IMAGEIDENTIFIER 2
166#define OFFSET_TOOLBARITEM_TARGET 3
167#define OFFSET_TOOLBARITEM_CONTEXT 4
168#define OFFSET_TOOLBARITEM_CONTROLTYPE 5
169#define OFFSET_TOOLBARITEM_WIDTH 6

--- 130 unchanged lines hidden (view full) ---

300
301 sal_Bool HasAddonsMenu () const ;
302 sal_Bool HasAddonsHelpMenu () const ;
303 sal_Int32 GetAddonsToolBarCount() const ;
304 const Sequence< Sequence< PropertyValue > >& GetAddonsMenu () const ;
305 const Sequence< Sequence< PropertyValue > >& GetAddonsMenuBarPart () const ;
306 const Sequence< Sequence< PropertyValue > >& GetAddonsToolBarPart ( sal_uInt32 nIndex ) const ;
307 const ::rtl::OUString GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const;
308 const ::rtl::OUString GetAddonsToolbarUIName( sal_uInt32 nIndex ) const;
299 const Sequence< Sequence< PropertyValue > >& GetAddonsHelpMenu () const ;
300 Image GetImageFromURL( const rtl::OUString& aURL, sal_Bool bBig, sal_Bool bHiContrast, sal_Bool bNoScale ) const;
301 const MergeMenuInstructionContainer& GetMergeMenuInstructions() const;
302 bool GetMergeToolbarInstructions( const ::rtl::OUString& rToolbarName, MergeToolbarInstructionContainer& rToolbarInstructions ) const;
303 const MergeStatusbarInstructionContainer& GetMergeStatusbarInstructions() const;
304 void ReadConfigurationData();
305
306 //-------------------------------------------------------------------------------------------------------------

--- 36 unchanged lines hidden (view full) ---

343 @param "nCount" , returns count of menu entries for "new"
344 @return A list of configuration key names is returned.
345
346 @onerror -
347 *//*-*****************************************************************************************************/
348
349 sal_Bool ReadAddonMenuSet( Sequence< Sequence< PropertyValue > >& aAddonMenuSeq );
350 sal_Bool ReadOfficeMenuBarSet( Sequence< Sequence< PropertyValue > >& aAddonOfficeMenuBarSeq );
309 const Sequence< Sequence< PropertyValue > >& GetAddonsHelpMenu () const ;
310 Image GetImageFromURL( const rtl::OUString& aURL, sal_Bool bBig, sal_Bool bHiContrast, sal_Bool bNoScale ) const;
311 const MergeMenuInstructionContainer& GetMergeMenuInstructions() const;
312 bool GetMergeToolbarInstructions( const ::rtl::OUString& rToolbarName, MergeToolbarInstructionContainer& rToolbarInstructions ) const;
313 const MergeStatusbarInstructionContainer& GetMergeStatusbarInstructions() const;
314 void ReadConfigurationData();
315
316 //-------------------------------------------------------------------------------------------------------------

--- 36 unchanged lines hidden (view full) ---

353 @param "nCount" , returns count of menu entries for "new"
354 @return A list of configuration key names is returned.
355
356 @onerror -
357 *//*-*****************************************************************************************************/
358
359 sal_Bool ReadAddonMenuSet( Sequence< Sequence< PropertyValue > >& aAddonMenuSeq );
360 sal_Bool ReadOfficeMenuBarSet( Sequence< Sequence< PropertyValue > >& aAddonOfficeMenuBarSeq );
351 sal_Bool ReadOfficeToolBarSet( AddonToolBars& rAddonOfficeToolBars, std::vector< rtl::OUString >& rAddonOfficeToolBarResNames );
361 sal_Bool ReadOfficeToolBarSet( AddonToolBars& rAddonOfficeToolBars,
362 std::vector< rtl::OUString >& rAddonOfficeToolBarResNames,
363 std::vector< rtl::OUString >& rAddonOfficeToolBarUINames );
352 sal_Bool ReadToolBarItemSet( const rtl::OUString rToolBarItemSetNodeName, Sequence< Sequence< PropertyValue > >& aAddonOfficeToolBarSeq );
353 sal_Bool ReadOfficeHelpSet( Sequence< Sequence< PropertyValue > >& aAddonOfficeHelpMenuSeq );
354 sal_Bool ReadImages( ImageManager& aImageManager );
355 sal_Bool ReadMenuMergeInstructions( MergeMenuInstructionContainer& rContainer );
356 sal_Bool ReadToolbarMergeInstructions( ToolbarMergingInstructions& rToolbarMergeMap );
357 sal_Bool ReadStatusbarMergeInstructions( MergeStatusbarInstructionContainer& rContainer );
358
359 sal_Bool ReadMergeMenuData( const ::rtl::OUString& aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeMenu );

--- 13 unchanged lines hidden (view full) ---

373
374 sal_Bool ReadSubMenuEntries( const Sequence< ::rtl::OUString >& aSubMenuNodeNames, Sequence< Sequence< PropertyValue > >& rSubMenu );
375 void InsertToolBarSeparator( Sequence< Sequence< PropertyValue > >& rAddonOfficeToolBarSeq );
376 ::rtl::OUString GeneratePrefixURL();
377
378 Sequence< ::rtl::OUString > GetPropertyNamesMergeMenuInstruction( const ::rtl::OUString& aPropertyRootName ) const;
379 Sequence< ::rtl::OUString > GetPropertyNamesMenuItem( const ::rtl::OUString& aPropertyRootNode ) const;
380 Sequence< ::rtl::OUString > GetPropertyNamesPopupMenu( const ::rtl::OUString& aPropertyRootNode ) const;
364 sal_Bool ReadToolBarItemSet( const rtl::OUString rToolBarItemSetNodeName, Sequence< Sequence< PropertyValue > >& aAddonOfficeToolBarSeq );
365 sal_Bool ReadOfficeHelpSet( Sequence< Sequence< PropertyValue > >& aAddonOfficeHelpMenuSeq );
366 sal_Bool ReadImages( ImageManager& aImageManager );
367 sal_Bool ReadMenuMergeInstructions( MergeMenuInstructionContainer& rContainer );
368 sal_Bool ReadToolbarMergeInstructions( ToolbarMergingInstructions& rToolbarMergeMap );
369 sal_Bool ReadStatusbarMergeInstructions( MergeStatusbarInstructionContainer& rContainer );
370
371 sal_Bool ReadMergeMenuData( const ::rtl::OUString& aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeMenu );

--- 13 unchanged lines hidden (view full) ---

385
386 sal_Bool ReadSubMenuEntries( const Sequence< ::rtl::OUString >& aSubMenuNodeNames, Sequence< Sequence< PropertyValue > >& rSubMenu );
387 void InsertToolBarSeparator( Sequence< Sequence< PropertyValue > >& rAddonOfficeToolBarSeq );
388 ::rtl::OUString GeneratePrefixURL();
389
390 Sequence< ::rtl::OUString > GetPropertyNamesMergeMenuInstruction( const ::rtl::OUString& aPropertyRootName ) const;
391 Sequence< ::rtl::OUString > GetPropertyNamesMenuItem( const ::rtl::OUString& aPropertyRootNode ) const;
392 Sequence< ::rtl::OUString > GetPropertyNamesPopupMenu( const ::rtl::OUString& aPropertyRootNode ) const;
393 Sequence< ::rtl::OUString > GetPropertyNamesToolBar( const ::rtl::OUString& aPropertyRootNode ) const;
381 Sequence< ::rtl::OUString > GetPropertyNamesToolBarItem( const ::rtl::OUString& aPropertyRootNode ) const;
382 Sequence< ::rtl::OUString > GetPropertyNamesStatusbarItem( const ::rtl::OUString& aPropertyRootNode ) const;
383 Sequence< ::rtl::OUString > GetPropertyNamesImages( const ::rtl::OUString& aPropertyRootNode ) const;
384 sal_Bool CreateImageFromSequence( Image& rImage, sal_Bool bBig, Sequence< sal_Int8 >& rBitmapDataSeq ) const;
385
386 //-------------------------------------------------------------------------------------------------------------
387 // private member
388 //-------------------------------------------------------------------------------------------------------------

--- 11 unchanged lines hidden (view full) ---

400 ::rtl::OUString m_aPathDelimiter;
401 ::rtl::OUString m_aSeparator;
402 ::rtl::OUString m_aRootAddonPopupMenuURLPrexfix;
403 ::rtl::OUString m_aPrivateImageURL;
404 Sequence< Sequence< PropertyValue > > m_aCachedMenuProperties;
405 Sequence< Sequence< PropertyValue > > m_aCachedMenuBarPartProperties;
406 AddonToolBars m_aCachedToolBarPartProperties;
407 std::vector< rtl::OUString > m_aCachedToolBarPartResourceNames;
394 Sequence< ::rtl::OUString > GetPropertyNamesToolBarItem( const ::rtl::OUString& aPropertyRootNode ) const;
395 Sequence< ::rtl::OUString > GetPropertyNamesStatusbarItem( const ::rtl::OUString& aPropertyRootNode ) const;
396 Sequence< ::rtl::OUString > GetPropertyNamesImages( const ::rtl::OUString& aPropertyRootNode ) const;
397 sal_Bool CreateImageFromSequence( Image& rImage, sal_Bool bBig, Sequence< sal_Int8 >& rBitmapDataSeq ) const;
398
399 //-------------------------------------------------------------------------------------------------------------
400 // private member
401 //-------------------------------------------------------------------------------------------------------------

--- 11 unchanged lines hidden (view full) ---

413 ::rtl::OUString m_aPathDelimiter;
414 ::rtl::OUString m_aSeparator;
415 ::rtl::OUString m_aRootAddonPopupMenuURLPrexfix;
416 ::rtl::OUString m_aPrivateImageURL;
417 Sequence< Sequence< PropertyValue > > m_aCachedMenuProperties;
418 Sequence< Sequence< PropertyValue > > m_aCachedMenuBarPartProperties;
419 AddonToolBars m_aCachedToolBarPartProperties;
420 std::vector< rtl::OUString > m_aCachedToolBarPartResourceNames;
421 std::vector< rtl::OUString > m_aCachedToolBarPartUINames;
408 Sequence< Sequence< PropertyValue > > m_aCachedHelpMenuProperties;
409 Reference< com::sun::star::util::XMacroExpander > m_xMacroExpander;
410 ImageManager m_aImageManager;
411 Sequence< Sequence< PropertyValue > > m_aEmptyAddonToolBar;
412 MergeMenuInstructionContainer m_aCachedMergeMenuInsContainer;
413 ToolbarMergingInstructions m_aCachedToolbarMergingInstructions;
414 MergeStatusbarInstructionContainer m_aCachedStatusbarMergingInstructions;
415};

--- 21 unchanged lines hidden (view full) ---

437 m_aPropNames[ INDEX_IMAGEIDENTIFIER ] = PROPERTYNAME_IMAGEIDENTIFIER;
438 m_aPropNames[ INDEX_CONTEXT ] = PROPERTYNAME_CONTEXT;
439 m_aPropNames[ INDEX_SUBMENU ] = PROPERTYNAME_SUBMENU; // Submenu set!
440 m_aPropNames[ INDEX_CONTROLTYPE ] = PROPERTYNAME_CONTROLTYPE;
441 m_aPropNames[ INDEX_WIDTH ] = PROPERTYNAME_WIDTH;
442 m_aPropNames[ INDEX_ALIGN ] = PROPERTYNAME_ALIGN;
443 m_aPropNames[ INDEX_AUTOSIZE ] = PROPERTYNAME_AUTOSIZE;
444 m_aPropNames[ INDEX_OWNERDRAW ] = PROPERTYNAME_OWNERDRAW;
422 Sequence< Sequence< PropertyValue > > m_aCachedHelpMenuProperties;
423 Reference< com::sun::star::util::XMacroExpander > m_xMacroExpander;
424 ImageManager m_aImageManager;
425 Sequence< Sequence< PropertyValue > > m_aEmptyAddonToolBar;
426 MergeMenuInstructionContainer m_aCachedMergeMenuInsContainer;
427 ToolbarMergingInstructions m_aCachedToolbarMergingInstructions;
428 MergeStatusbarInstructionContainer m_aCachedStatusbarMergingInstructions;
429};

--- 21 unchanged lines hidden (view full) ---

451 m_aPropNames[ INDEX_IMAGEIDENTIFIER ] = PROPERTYNAME_IMAGEIDENTIFIER;
452 m_aPropNames[ INDEX_CONTEXT ] = PROPERTYNAME_CONTEXT;
453 m_aPropNames[ INDEX_SUBMENU ] = PROPERTYNAME_SUBMENU; // Submenu set!
454 m_aPropNames[ INDEX_CONTROLTYPE ] = PROPERTYNAME_CONTROLTYPE;
455 m_aPropNames[ INDEX_WIDTH ] = PROPERTYNAME_WIDTH;
456 m_aPropNames[ INDEX_ALIGN ] = PROPERTYNAME_ALIGN;
457 m_aPropNames[ INDEX_AUTOSIZE ] = PROPERTYNAME_AUTOSIZE;
458 m_aPropNames[ INDEX_OWNERDRAW ] = PROPERTYNAME_OWNERDRAW;
459 m_aPropNames[ INDEX_TOOLBARITEMS ] = PROPERTYNAME_TOOLBARITEMS;
445
446 // initialize array with fixed images property names
447 m_aPropImagesNames[ OFFSET_IMAGES_SMALL ] = PROPERTYNAME_IMAGESMALL;
448 m_aPropImagesNames[ OFFSET_IMAGES_BIG ] = PROPERTYNAME_IMAGEBIG;
449 m_aPropImagesNames[ OFFSET_IMAGES_SMALLHC ] = PROPERTYNAME_IMAGESMALLHC;
450 m_aPropImagesNames[ OFFSET_IMAGES_BIGHC ] = PROPERTYNAME_IMAGEBIGHC;
451 m_aPropImagesNames[ OFFSET_IMAGES_SMALL_URL ] = PROPERTYNAME_IMAGESMALL_URL;
452 m_aPropImagesNames[ OFFSET_IMAGES_BIG_URL ] = PROPERTYNAME_IMAGEBIG_URL;

--- 57 unchanged lines hidden (view full) ---

510void AddonsOptions_Impl::ReadConfigurationData()
511{
512 // reset members to be read again from configuration
513 m_aCachedMenuProperties = Sequence< Sequence< PropertyValue > >();
514 m_aCachedMenuBarPartProperties = Sequence< Sequence< PropertyValue > >();
515 m_aCachedToolBarPartProperties = AddonToolBars();
516 m_aCachedHelpMenuProperties = Sequence< Sequence< PropertyValue > >();
517 m_aCachedToolBarPartResourceNames.clear();
460
461 // initialize array with fixed images property names
462 m_aPropImagesNames[ OFFSET_IMAGES_SMALL ] = PROPERTYNAME_IMAGESMALL;
463 m_aPropImagesNames[ OFFSET_IMAGES_BIG ] = PROPERTYNAME_IMAGEBIG;
464 m_aPropImagesNames[ OFFSET_IMAGES_SMALLHC ] = PROPERTYNAME_IMAGESMALLHC;
465 m_aPropImagesNames[ OFFSET_IMAGES_BIGHC ] = PROPERTYNAME_IMAGEBIGHC;
466 m_aPropImagesNames[ OFFSET_IMAGES_SMALL_URL ] = PROPERTYNAME_IMAGESMALL_URL;
467 m_aPropImagesNames[ OFFSET_IMAGES_BIG_URL ] = PROPERTYNAME_IMAGEBIG_URL;

--- 57 unchanged lines hidden (view full) ---

525void AddonsOptions_Impl::ReadConfigurationData()
526{
527 // reset members to be read again from configuration
528 m_aCachedMenuProperties = Sequence< Sequence< PropertyValue > >();
529 m_aCachedMenuBarPartProperties = Sequence< Sequence< PropertyValue > >();
530 m_aCachedToolBarPartProperties = AddonToolBars();
531 m_aCachedHelpMenuProperties = Sequence< Sequence< PropertyValue > >();
532 m_aCachedToolBarPartResourceNames.clear();
533 m_aCachedToolBarPartUINames.clear();
518 m_aImageManager = ImageManager();
519
520 ReadAddonMenuSet( m_aCachedMenuProperties );
521 ReadOfficeMenuBarSet( m_aCachedMenuBarPartProperties );
534 m_aImageManager = ImageManager();
535
536 ReadAddonMenuSet( m_aCachedMenuProperties );
537 ReadOfficeMenuBarSet( m_aCachedMenuBarPartProperties );
522 ReadOfficeToolBarSet( m_aCachedToolBarPartProperties, m_aCachedToolBarPartResourceNames );
538 ReadOfficeToolBarSet( m_aCachedToolBarPartProperties,
539 m_aCachedToolBarPartResourceNames,
540 m_aCachedToolBarPartUINames );
523
524 ReadOfficeHelpSet( m_aCachedHelpMenuProperties );
525 ReadImages( m_aImageManager );
526
527 m_aCachedMergeMenuInsContainer.clear();
528 m_aCachedToolbarMergingInstructions.clear();
529 m_aCachedStatusbarMergingInstructions.clear();
530

--- 75 unchanged lines hidden (view full) ---

606const ::rtl::OUString AddonsOptions_Impl::GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const
607{
608 if ( nIndex < m_aCachedToolBarPartResourceNames.size() )
609 return m_aCachedToolBarPartResourceNames[nIndex];
610 else
611 return rtl::OUString();
612}
613
541
542 ReadOfficeHelpSet( m_aCachedHelpMenuProperties );
543 ReadImages( m_aImageManager );
544
545 m_aCachedMergeMenuInsContainer.clear();
546 m_aCachedToolbarMergingInstructions.clear();
547 m_aCachedStatusbarMergingInstructions.clear();
548

--- 75 unchanged lines hidden (view full) ---

624const ::rtl::OUString AddonsOptions_Impl::GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const
625{
626 if ( nIndex < m_aCachedToolBarPartResourceNames.size() )
627 return m_aCachedToolBarPartResourceNames[nIndex];
628 else
629 return rtl::OUString();
630}
631
632
633const ::rtl::OUString AddonsOptions_Impl::GetAddonsToolbarUIName( sal_uInt32 nIndex ) const
634{
635 if ( nIndex < m_aCachedToolBarPartUINames.size() )
636 return m_aCachedToolBarPartUINames[nIndex];
637 else
638 return rtl::OUString();
639}
640
614//*****************************************************************************************************************
615// public method
616//*****************************************************************************************************************
617const Sequence< Sequence< PropertyValue > >& AddonsOptions_Impl::GetAddonsHelpMenu () const
618{
619 return m_aCachedHelpMenuProperties;
620}
621

--- 188 unchanged lines hidden (view full) ---

810 }
811
812 return ( rAddonOfficeMenuBarSeq.getLength() > 0 );
813}
814
815//*****************************************************************************************************************
816// private method
817//*****************************************************************************************************************
641//*****************************************************************************************************************
642// public method
643//*****************************************************************************************************************
644const Sequence< Sequence< PropertyValue > >& AddonsOptions_Impl::GetAddonsHelpMenu () const
645{
646 return m_aCachedHelpMenuProperties;
647}
648

--- 188 unchanged lines hidden (view full) ---

837 }
838
839 return ( rAddonOfficeMenuBarSeq.getLength() > 0 );
840}
841
842//*****************************************************************************************************************
843// private method
844//*****************************************************************************************************************
818sal_Bool AddonsOptions_Impl::ReadOfficeToolBarSet( AddonToolBars& rAddonOfficeToolBars, std::vector< rtl::OUString >& rAddonOfficeToolBarResNames )
845sal_Bool AddonsOptions_Impl::ReadOfficeToolBarSet(
846 AddonToolBars& rAddonOfficeToolBars,
847 std::vector< rtl::OUString >& rAddonOfficeToolBarResNames,
848 std::vector< rtl::OUString >& rAddonOfficeToolBarUINames )
819{
820 // Read the OfficeToolBar set and fill property sequences
821 ::rtl::OUString aAddonToolBarNodeName( RTL_CONSTASCII_USTRINGPARAM( "AddonUI/OfficeToolBar" ));
822 Sequence< ::rtl::OUString > aAddonToolBarNodeSeq = GetNodeNames( aAddonToolBarNodeName );
823 ::rtl::OUString aAddonToolBarNode( aAddonToolBarNodeName + m_aPathDelimiter );
824
825 sal_uInt32 nCount = aAddonToolBarNodeSeq.getLength();
826
827 for ( sal_uInt32 n = 0; n < nCount; n++ )
828 {
849{
850 // Read the OfficeToolBar set and fill property sequences
851 ::rtl::OUString aAddonToolBarNodeName( RTL_CONSTASCII_USTRINGPARAM( "AddonUI/OfficeToolBar" ));
852 Sequence< ::rtl::OUString > aAddonToolBarNodeSeq = GetNodeNames( aAddonToolBarNodeName );
853 ::rtl::OUString aAddonToolBarNode( aAddonToolBarNodeName + m_aPathDelimiter );
854
855 sal_uInt32 nCount = aAddonToolBarNodeSeq.getLength();
856
857 for ( sal_uInt32 n = 0; n < nCount; n++ )
858 {
829 ::rtl::OUString aToolBarItemNode( aAddonToolBarNode + aAddonToolBarNodeSeq[n] );
859 ::rtl::OUString aToolBarNode( aAddonToolBarNode + aAddonToolBarNodeSeq[n] + m_aPathDelimiter );
830 rAddonOfficeToolBarResNames.push_back( aAddonToolBarNodeSeq[n] );
831 rAddonOfficeToolBars.push_back( m_aEmptyAddonToolBar );
860 rAddonOfficeToolBarResNames.push_back( aAddonToolBarNodeSeq[n] );
861 rAddonOfficeToolBars.push_back( m_aEmptyAddonToolBar );
832 ReadToolBarItemSet( aToolBarItemNode, rAddonOfficeToolBars[n] );
862
863 Sequence< Any > aToolBarNodeValues = GetProperties( GetPropertyNamesToolBar( aToolBarNode ) );
864
865 rtl::OUString aUIName;
866 aToolBarNodeValues[OFFSET_TOOLBAR_TITLE] >>= aUIName;
867 rAddonOfficeToolBarUINames.push_back( aUIName );
868
869 Reference < XInterface > xToolbarItems;
870 if ( ( aToolBarNodeValues[OFFSET_TOOLBAR_TOOLBARITEMS] >>= xToolbarItems ) && xToolbarItems.is() )
871 {
872 ::rtl::OUStringBuffer aBuffer;
873 aBuffer.append( aToolBarNode );
874 aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( STR_TOOLBARITEMS ) );
875 ReadToolBarItemSet( aBuffer.makeStringAndClear(), rAddonOfficeToolBars[n] );
876 }
833 }
834
835 return ( !rAddonOfficeToolBars.empty() );
836}
837
838
839//*****************************************************************************************************************
840// private method

--- 966 unchanged lines hidden (view full) ---

1807 lResult[OFFSET_POPUPMENU_SUBMENU] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_SUBMENU ] );
1808
1809 return lResult;
1810}
1811
1812//*****************************************************************************************************************
1813// private method
1814//*****************************************************************************************************************
877 }
878
879 return ( !rAddonOfficeToolBars.empty() );
880}
881
882
883//*****************************************************************************************************************
884// private method

--- 966 unchanged lines hidden (view full) ---

1851 lResult[OFFSET_POPUPMENU_SUBMENU] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_SUBMENU ] );
1852
1853 return lResult;
1854}
1855
1856//*****************************************************************************************************************
1857// private method
1858//*****************************************************************************************************************
1859Sequence< ::rtl::OUString > AddonsOptions_Impl::GetPropertyNamesToolBar( const ::rtl::OUString& aPropertyRootNode ) const
1860{
1861 Sequence< ::rtl::OUString > lResult( PROPERTYCOUNT_TOOLBAR );
1862
1863 // Create property names dependent from the root node name
1864 lResult[OFFSET_TOOLBAR_TITLE] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_TITLE ] );
1865 lResult[OFFSET_TOOLBAR_TOOLBARITEMS] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_TOOLBARITEMS ] );
1866
1867 return lResult;
1868}
1869
1815Sequence< ::rtl::OUString > AddonsOptions_Impl::GetPropertyNamesToolBarItem( const ::rtl::OUString& aPropertyRootNode ) const
1816{
1817 Sequence< ::rtl::OUString > lResult( PROPERTYCOUNT_TOOLBARITEM );
1818
1819 // Create property names dependent from the root node name
1820 lResult[0] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_URL ] );
1821 lResult[1] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_TITLE ] );
1822 lResult[2] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_IMAGEIDENTIFIER] );

--- 143 unchanged lines hidden (view full) ---

1966// public method
1967//*****************************************************************************************************************
1968const ::rtl::OUString AddonsOptions::GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const
1969{
1970 MutexGuard aGuard( GetOwnStaticMutex() );
1971 return m_pDataContainer->GetAddonsToolbarResourceName( nIndex );
1972}
1973
1870Sequence< ::rtl::OUString > AddonsOptions_Impl::GetPropertyNamesToolBarItem( const ::rtl::OUString& aPropertyRootNode ) const
1871{
1872 Sequence< ::rtl::OUString > lResult( PROPERTYCOUNT_TOOLBARITEM );
1873
1874 // Create property names dependent from the root node name
1875 lResult[0] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_URL ] );
1876 lResult[1] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_TITLE ] );
1877 lResult[2] = ::rtl::OUString( aPropertyRootNode + m_aPropNames[ INDEX_IMAGEIDENTIFIER] );

--- 143 unchanged lines hidden (view full) ---

2021// public method
2022//*****************************************************************************************************************
2023const ::rtl::OUString AddonsOptions::GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const
2024{
2025 MutexGuard aGuard( GetOwnStaticMutex() );
2026 return m_pDataContainer->GetAddonsToolbarResourceName( nIndex );
2027}
2028
2029const ::rtl::OUString AddonsOptions::GetAddonsToolbarUIName( sal_uInt32 nIndex ) const
2030{
2031 MutexGuard aGuard( GetOwnStaticMutex() );
2032 return m_pDataContainer->GetAddonsToolbarUIName( nIndex );
2033}
2034
1974//*****************************************************************************************************************
1975// public method
1976//*****************************************************************************************************************
1977const Sequence< Sequence< PropertyValue > >& AddonsOptions::GetAddonsHelpMenu() const
1978{
1979 MutexGuard aGuard( GetOwnStaticMutex() );
1980 return m_pDataContainer->GetAddonsHelpMenu();
1981}

--- 82 unchanged lines hidden ---
2035//*****************************************************************************************************************
2036// public method
2037//*****************************************************************************************************************
2038const Sequence< Sequence< PropertyValue > >& AddonsOptions::GetAddonsHelpMenu() const
2039{
2040 MutexGuard aGuard( GetOwnStaticMutex() );
2041 return m_pDataContainer->GetAddonsHelpMenu();
2042}

--- 82 unchanged lines hidden ---