cppcanvas/source/wrapper/implbitmapcanvas.cxx              |    3 
 cppcanvas/source/wrapper/implcustomsprite.cxx              |    3 
 cppcanvas/source/wrapper/implspritecanvas.cxx              |    3 
 cppcanvas/source/wrapper/vclfactory.cxx                    |    4 
 cppuhelper/source/propshlp.cxx                             |    2 
 cui/source/customize/CommandCategoryListBox.cxx            |    2 
 cui/source/customize/acccfg.cxx                            |   13 
 cui/source/customize/cfg.cxx                               |   27 
 cui/source/customize/cfgutil.cxx                           |    2 
 cui/source/dialogs/SpellDialog.cxx                         |   10 
 cui/source/dialogs/hlmarkwn.cxx                            |    5 
 cui/source/options/optdict.cxx                             |    6 
 cui/source/options/optlingu.cxx                            |    2 
 cui/source/options/treeopt.cxx                             |   18 
 cui/source/options/webconninfo.cxx                         |   10 
 framework/source/fwe/classes/addonsoptions.cxx             |  352 ++++++++++++-
 include/framework/addonsoptions.hxx                        |   47 +
 officecfg/registry/schema/org/openoffice/Office/Addons.xcs |  105 +++
 18 files changed, 546 insertions(+), 68 deletions(-)

New commits:
commit 147e820cc1bd7110331a6ea73db678a4a6c324e0
Author:     Sumit Chauhan <sumitc...@gmail.com>
AuthorDate: Fri Jul 5 17:13:26 2019 +0530
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Fri Jul 19 11:47:56 2019 +0200

    Addons(extension) support is extended for NotebookBar
    
    This patch adds the schema for the extensions to be available in 
Notebookbar.
    We will adding items in addons.xcs in future if needed.
    
    Change-Id: I0a3831983b9758fac0a6fa32213ad6da20d6a97f
    Reviewed-on: https://gerrit.libreoffice.org/75134
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/framework/source/fwe/classes/addonsoptions.cxx 
b/framework/source/fwe/classes/addonsoptions.cxx
index 8bd00646294c..d0e5ece16c7f 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -75,7 +75,8 @@ using namespace ::com::sun::star;
 #define INDEX_AUTOSIZE          9
 #define INDEX_OWNERDRAW         10
 #define INDEX_MANDATORY         11
-#define PROPERTYCOUNT_INDEX     12
+#define INDEX_STYLE             12
+#define PROPERTYCOUNT_INDEX     13
 
 // The following order is mandatory. Please add properties at the end!
 #define PROPERTYCOUNT_MENUITEM                          6
@@ -104,6 +105,17 @@ using namespace ::com::sun::star;
 #define OFFSET_TOOLBARITEM_WIDTH                        6
 
 // The following order is mandatory. Please add properties at the end!
+#define PROPERTYCOUNT_NOTEBOOKBARITEM                   8
+#define OFFSET_NOTEBOOKBARITEM_URL                      0
+#define OFFSET_NOTEBOOKBARITEM_TITLE                    1
+#define OFFSET_NOTEBOOKBARITEM_IMAGEIDENTIFIER          2
+#define OFFSET_NOTEBOOKBARITEM_TARGET                   3
+#define OFFSET_NOTEBOOKBARITEM_CONTEXT                  4
+#define OFFSET_NOTEBOOKBARITEM_CONTROLTYPE              5
+#define OFFSET_NOTEBOOKBARITEM_WIDTH                    6
+#define OFFSET_NOTEBOOKBARITEM_STYLE                    7
+
+// The following order is mandatory. Please add properties at the end!
 #define PROPERTYCOUNT_STATUSBARITEM                     8
 #define OFFSET_STATUSBARITEM_URL                        0
 #define OFFSET_STATUSBARITEM_TITLE                      1
@@ -143,6 +155,15 @@ using namespace ::com::sun::star;
 #define OFFSET_MERGETOOLBAR_MERGECONTEXT                5
 #define OFFSET_MERGETOOLBAR_TOOLBARITEMS                6
 
+#define PROPERTYCOUNT_MERGE_NOTEBOOKBAR                 7
+#define OFFSET_MERGENOTEBOOKBAR_NOTEBOOKBAR             0
+#define OFFSET_MERGENOTEBOOKBAR_MERGEPOINT              1
+#define OFFSET_MERGENOTEBOOKBAR_MERGECOMMAND            2
+#define OFFSET_MERGENOTEBOOKBAR_MERGECOMMANDPARAMETER   3
+#define OFFSET_MERGENOTEBOOKBAR_MERGEFALLBACK           4
+#define OFFSET_MERGENOTEBOOKBAR_MERGECONTEXT            5
+#define OFFSET_MERGENOTEBOOKBAR_NOTEBOOKBARITEMS        6
+
 #define PROPERTYCOUNT_MERGE_STATUSBAR                   6
 #define OFFSET_MERGESTATUSBAR_MERGEPOINT                0
 #define OFFSET_MERGESTATUSBAR_MERGECOMMAND              1
@@ -197,14 +218,18 @@ class AddonsOptions_Impl : public ConfigItem
 
         bool                                            HasAddonsMenu        
() const;
         sal_Int32                                       
GetAddonsToolBarCount() const;
+        sal_Int32                                       
GetAddonsNotebookBarCount() const;
         const Sequence< Sequence< PropertyValue > >&    GetAddonsMenu        
() const { return m_aCachedMenuProperties;}
         const Sequence< Sequence< PropertyValue > >&    GetAddonsMenuBarPart 
() const { return m_aCachedMenuBarPartProperties;}
         const Sequence< Sequence< PropertyValue > >&    GetAddonsToolBarPart ( 
sal_uInt32 nIndex ) const;
+        const Sequence< Sequence< PropertyValue > >&    
GetAddonsNotebookBarPart ( sal_uInt32 nIndex ) const;
         const OUString                           GetAddonsToolbarResourceName( 
sal_uInt32 nIndex ) const;
+        const OUString                           
GetAddonsNotebookBarResourceName( sal_uInt32 nIndex ) const;
         const Sequence< Sequence< PropertyValue > >&    GetAddonsHelpMenu    
() const { return m_aCachedHelpMenuProperties;}
         Image                                           GetImageFromURL( const 
OUString& aURL, bool bBig, bool bNoScale );
         const MergeMenuInstructionContainer&            
GetMergeMenuInstructions() const { return m_aCachedMergeMenuInsContainer;}
         bool                                            
GetMergeToolbarInstructions( const OUString& rToolbarName, 
MergeToolbarInstructionContainer& rToolbarInstructions ) const;
+        bool                                            
GetMergeNotebookBarInstructions( const OUString& rNotebookBarName, 
MergeNotebookBarInstructionContainer& rNotebookBarInstructions ) const;
         const MergeStatusbarInstructionContainer&       
GetMergeStatusbarInstructions() const { return 
m_aCachedStatusbarMergingInstructions;}
         void                                            
ReadConfigurationData();
 
@@ -236,7 +261,9 @@ class AddonsOptions_Impl : public ConfigItem
         typedef std::unordered_map< OUString, ImageEntry > ImageManager;
         typedef std::unordered_map< OUString, sal_uInt32 > StringToIndexMap;
         typedef std::vector< Sequence< Sequence< PropertyValue > > > 
AddonToolBars;
+        typedef std::vector< Sequence< Sequence< PropertyValue > > > 
AddonNotebookBars;
         typedef std::unordered_map< OUString, MergeToolbarInstructionContainer 
> ToolbarMergingInstructions;
+        typedef std::unordered_map< OUString, 
MergeNotebookBarInstructionContainer > NotebookBarMergingInstructions;
 
         
/*-****************************************************************************************************
             @short      return list of key names of our configuration 
management which represent our module tree
@@ -250,19 +277,26 @@ class AddonsOptions_Impl : public ConfigItem
         void                 ReadOfficeMenuBarSet( Sequence< Sequence< 
PropertyValue > >& aAddonOfficeMenuBarSeq );
         void                 ReadOfficeToolBarSet( AddonToolBars& 
rAddonOfficeToolBars, std::vector< OUString >& rAddonOfficeToolBarResNames );
         bool                 ReadToolBarItemSet( const OUString& 
rToolBarItemSetNodeName, Sequence< Sequence< PropertyValue > >& 
aAddonOfficeToolBarSeq );
+        void                 ReadOfficeNotebookBarSet( AddonNotebookBars& 
rAddonOfficeNotebookBars, std::vector< OUString >& 
rAddonOfficeNotebookBarResNames );
+        bool                 ReadNotebookBarItemSet( const OUString& 
rNotebookBarItemSetNodeName, Sequence< Sequence< PropertyValue > >& 
aAddonOfficeNotebookBarSeq );
+
         void                 ReadOfficeHelpSet( Sequence< Sequence< 
PropertyValue > >& aAddonOfficeHelpMenuSeq );
         void                 ReadImages( ImageManager& aImageManager );
         void                 ReadMenuMergeInstructions( 
MergeMenuInstructionContainer& rContainer );
         void                 ReadToolbarMergeInstructions( 
ToolbarMergingInstructions& rToolbarMergeMap );
+        void                 ReadNotebookBarMergeInstructions( 
NotebookBarMergingInstructions& rNotebookBarMergeMap );
         void                 ReadStatusbarMergeInstructions( 
MergeStatusbarInstructionContainer& rContainer );
 
         void                 ReadMergeMenuData( const OUString& 
aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeMenu );
         bool                 ReadMergeToolbarData( const OUString& 
aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& 
rMergeToolbarItems );
+        bool                 ReadMergeNotebookBarData( const OUString& 
aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& 
rMergeNotebookBarItems );
         bool                 ReadMergeStatusbarData( const OUString& 
aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& 
rMergeStatusbar );
         bool                 ReadMenuItem( const OUString& aMenuItemNodeName, 
Sequence< PropertyValue >& aMenuItem, bool bIgnoreSubMenu = false );
         bool                 ReadPopupMenu( const OUString& 
aPopupMenuNodeName, Sequence< PropertyValue >& aPopupMenu );
         void                 AppendPopupMenu( Sequence< PropertyValue >& 
aTargetPopupMenu, const Sequence< PropertyValue >& rSourcePopupMenu );
         bool                 ReadToolBarItem( const OUString& 
aToolBarItemNodeName, Sequence< PropertyValue >& aToolBarItem );
+        bool                 ReadNotebookBarItem( const OUString& 
aNotebookBarItemNodeName, Sequence< PropertyValue >& aNotebookBarItem );
+
         bool                 ReadStatusBarItem( const OUString& 
aStatusbarItemNodeName, Sequence< PropertyValue >& aStatusbarItem );
         std::unique_ptr<ImageEntry> ReadImageData( const OUString& 
aImagesNodeName );
         void                 ReadAndAssociateImages( const OUString& aURL, 
const OUString& aImageId );
@@ -276,6 +310,8 @@ class AddonsOptions_Impl : public ConfigItem
         Sequence< OUString > GetPropertyNamesMenuItem( const OUString& 
aPropertyRootNode ) const;
         Sequence< OUString > GetPropertyNamesPopupMenu( const OUString& 
aPropertyRootNode ) const;
         Sequence< OUString > GetPropertyNamesToolBarItem( const OUString& 
aPropertyRootNode ) const;
+        Sequence< OUString > GetPropertyNamesNotebookBarItem( const OUString& 
aPropertyRootNode ) const;
+
         Sequence< OUString > GetPropertyNamesStatusbarItem( const OUString& 
aPropertyRootNode ) const;
         Sequence< OUString > GetPropertyNamesImages( const OUString& 
aPropertyRootNode ) const;
         bool                 CreateImageFromSequence( Image& rImage, Sequence< 
sal_Int8 >& rBitmapDataSeq ) const;
@@ -292,18 +328,23 @@ class AddonsOptions_Impl : public ConfigItem
         OUString                                   
m_aPropImagesNames[PROPERTYCOUNT_IMAGES];
         OUString                                   
m_aPropMergeMenuNames[PROPERTYCOUNT_MERGE_MENUBAR];
         OUString                                   
m_aPropMergeToolbarNames[PROPERTYCOUNT_MERGE_TOOLBAR];
+        OUString                                   
m_aPropMergeNotebookBarNames[PROPERTYCOUNT_MERGE_NOTEBOOKBAR];
         OUString                                   
m_aPropMergeStatusbarNames[PROPERTYCOUNT_MERGE_STATUSBAR];
         OUString                                   m_aPathDelimiter;
         OUString                                   
m_aRootAddonPopupMenuURLPrexfix;
         Sequence< Sequence< PropertyValue > >             
m_aCachedMenuProperties;
         Sequence< Sequence< PropertyValue > >             
m_aCachedMenuBarPartProperties;
         AddonToolBars                                     
m_aCachedToolBarPartProperties;
+        AddonNotebookBars                                 
m_aCachedNotebookBarPartProperties;
         std::vector< OUString >                      
m_aCachedToolBarPartResourceNames;
+        std::vector< OUString >                      
m_aCachedNotebookBarPartResourceNames;
         Sequence< Sequence< PropertyValue > >             
m_aCachedHelpMenuProperties;
         ImageManager                                      m_aImageManager;
         Sequence< Sequence< PropertyValue > >             m_aEmptyAddonToolBar;
+        Sequence< Sequence< PropertyValue > >             
m_aEmptyAddonNotebookBar;
         MergeMenuInstructionContainer                     
m_aCachedMergeMenuInsContainer;
         ToolbarMergingInstructions                        
m_aCachedToolbarMergingInstructions;
+        NotebookBarMergingInstructions                    
m_aCachedNotebookBarMergingInstructions;
         MergeStatusbarInstructionContainer                
m_aCachedStatusbarMergingInstructions;
 };
 
@@ -337,6 +378,7 @@ AddonsOptions_Impl::AddonsOptions_Impl()
     m_aPropNames[ INDEX_AUTOSIZE        ] = "AutoSize";
     m_aPropNames[ INDEX_OWNERDRAW       ] = "OwnerDraw";
     m_aPropNames[ INDEX_MANDATORY       ] = "Mandatory";
+    m_aPropNames[ INDEX_STYLE           ] = "Style";
 
     // initialize array with fixed images property names
     m_aPropImagesNames[ OFFSET_IMAGES_SMALL         ] = "ImageSmall";
@@ -364,6 +406,14 @@ AddonsOptions_Impl::AddonsOptions_Impl()
     m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_MERGECONTEXT          ] = 
"MergeContext";
     m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_TOOLBARITEMS          ] = 
"ToolBarItems";
 
+    m_aPropMergeNotebookBarNames[ OFFSET_MERGENOTEBOOKBAR_NOTEBOOKBAR          
 ] = "MergeNotebookBar";
+    m_aPropMergeNotebookBarNames[ OFFSET_MERGENOTEBOOKBAR_MERGEPOINT           
 ] = "MergePoint";
+    m_aPropMergeNotebookBarNames[ OFFSET_MERGENOTEBOOKBAR_MERGECOMMAND         
 ] = "MergeCommand";
+    m_aPropMergeNotebookBarNames[ 
OFFSET_MERGENOTEBOOKBAR_MERGECOMMANDPARAMETER ] = "MergeCommandParameter";
+    m_aPropMergeNotebookBarNames[ OFFSET_MERGENOTEBOOKBAR_MERGEFALLBACK        
 ] = "MergeFallback";
+    m_aPropMergeNotebookBarNames[ OFFSET_MERGENOTEBOOKBAR_MERGECONTEXT         
 ] = "MergeContext";
+    m_aPropMergeNotebookBarNames[ OFFSET_MERGENOTEBOOKBAR_NOTEBOOKBARITEMS     
 ] = "NotebookBarItems";
+
     m_aPropMergeStatusbarNames[ OFFSET_MERGESTATUSBAR_MERGEPOINT            ] 
= "MergePoint";
     m_aPropMergeStatusbarNames[ OFFSET_MERGESTATUSBAR_MERGECOMMAND          ] 
= "MergeCommand";
     m_aPropMergeStatusbarNames[ OFFSET_MERGESTATUSBAR_MERGECOMMANDPARAMETER ] 
= "MergeCommandParameter";
@@ -392,23 +442,28 @@ void AddonsOptions_Impl::ReadConfigurationData()
     m_aCachedMenuProperties = Sequence< Sequence< PropertyValue > >();
     m_aCachedMenuBarPartProperties = Sequence< Sequence< PropertyValue > >();
     m_aCachedToolBarPartProperties = AddonToolBars();
+    m_aCachedNotebookBarPartProperties = AddonNotebookBars();
     m_aCachedHelpMenuProperties = Sequence< Sequence< PropertyValue > >();
     m_aCachedToolBarPartResourceNames.clear();
+    m_aCachedNotebookBarPartResourceNames.clear();
     m_aImageManager = ImageManager();
 
     ReadAddonMenuSet( m_aCachedMenuProperties );
     ReadOfficeMenuBarSet( m_aCachedMenuBarPartProperties );
     ReadOfficeToolBarSet( m_aCachedToolBarPartProperties, 
m_aCachedToolBarPartResourceNames );
+    ReadOfficeNotebookBarSet( m_aCachedNotebookBarPartProperties, 
m_aCachedNotebookBarPartResourceNames );
 
     ReadOfficeHelpSet( m_aCachedHelpMenuProperties );
     ReadImages( m_aImageManager );
 
     m_aCachedMergeMenuInsContainer.clear();
     m_aCachedToolbarMergingInstructions.clear();
+    m_aCachedNotebookBarMergingInstructions.clear();
     m_aCachedStatusbarMergingInstructions.clear();
 
     ReadMenuMergeInstructions( m_aCachedMergeMenuInsContainer );
     ReadToolbarMergeInstructions( m_aCachedToolbarMergingInstructions );
+    ReadNotebookBarMergeInstructions( m_aCachedNotebookBarMergingInstructions 
);
     ReadStatusbarMergeInstructions( m_aCachedStatusbarMergingInstructions );
 }
 
@@ -442,6 +497,13 @@ sal_Int32 AddonsOptions_Impl::GetAddonsToolBarCount() const
 
 //  public method
 
+sal_Int32 AddonsOptions_Impl::GetAddonsNotebookBarCount() const
+{
+    return m_aCachedNotebookBarPartProperties.size();
+}
+
+//  public method
+
 const Sequence< Sequence< PropertyValue > >& 
AddonsOptions_Impl::GetAddonsToolBarPart( sal_uInt32 nIndex ) const
 {
     if ( /*nIndex >= 0 &&*/ nIndex < m_aCachedToolBarPartProperties.size() )
@@ -452,6 +514,16 @@ const Sequence< Sequence< PropertyValue > >& 
AddonsOptions_Impl::GetAddonsToolBa
 
 //  public method
 
+const Sequence< Sequence< PropertyValue > >& 
AddonsOptions_Impl::GetAddonsNotebookBarPart( sal_uInt32 nIndex ) const
+{
+    if ( /*nIndex >= 0 &&*/ nIndex < m_aCachedNotebookBarPartProperties.size() 
)
+        return m_aCachedNotebookBarPartProperties[nIndex];
+    else
+        return m_aEmptyAddonNotebookBar;
+}
+
+//  public method
+
 const OUString AddonsOptions_Impl::GetAddonsToolbarResourceName( sal_uInt32 
nIndex ) const
 {
     if ( nIndex < m_aCachedToolBarPartResourceNames.size() )
@@ -462,6 +534,16 @@ const OUString 
AddonsOptions_Impl::GetAddonsToolbarResourceName( sal_uInt32 nInd
 
 //  public method
 
+const OUString AddonsOptions_Impl::GetAddonsNotebookBarResourceName( 
sal_uInt32 nIndex ) const
+{
+    if ( nIndex < m_aCachedNotebookBarPartResourceNames.size() )
+        return m_aCachedNotebookBarPartResourceNames[nIndex];
+    else
+        return OUString();
+}
+
+//  public method
+
 bool AddonsOptions_Impl::GetMergeToolbarInstructions(
     const OUString& rToolbarName,
     MergeToolbarInstructionContainer& rToolbarInstructions ) const
@@ -478,6 +560,22 @@ bool AddonsOptions_Impl::GetMergeToolbarInstructions(
 
 //  public method
 
+bool AddonsOptions_Impl::GetMergeNotebookBarInstructions(
+    const OUString& rNotebookBarName,
+    MergeNotebookBarInstructionContainer& rNotebookBarInstructions ) const
+{
+    NotebookBarMergingInstructions::const_iterator pIter = 
m_aCachedNotebookBarMergingInstructions.find( rNotebookBarName );
+    if ( pIter != m_aCachedNotebookBarMergingInstructions.end() )
+    {
+        rNotebookBarInstructions = pIter->second;
+        return true;
+    }
+    else
+        return false;
+}
+
+//  public method
+
 static Image ScaleImage( const Image &rImage, bool bBig )
 {
     Size aSize = ToolBox::GetDefaultImageSize(bBig ? ToolBoxButtonSize::Large 
: ToolBoxButtonSize::Small);
@@ -710,6 +808,65 @@ bool AddonsOptions_Impl::ReadToolBarItemSet( const 
OUString& rToolBarItemSetNode
     return ( static_cast<sal_uInt32>(rAddonOfficeToolBarSeq.getLength()) > 
nToolBarItemCount );
 }
 
+void AddonsOptions_Impl::ReadOfficeNotebookBarSet(
+    AddonNotebookBars& rAddonOfficeNotebookBars,
+    std::vector<OUString>& rAddonOfficeNotebookBarResNames)
+{
+    // Read the OfficeToolBar set and fill property sequences
+    OUString aAddonNotebookBarNodeName("AddonUI/OfficeNotebookBar");
+    Sequence<OUString> aAddonNotebookBarNodeSeq = 
GetNodeNames(aAddonNotebookBarNodeName);
+    OUString aAddonNotebookBarNode(aAddonNotebookBarNodeName + 
m_aPathDelimiter);
+
+    sal_uInt32 nCount = aAddonNotebookBarNodeSeq.getLength();
+
+    for (sal_uInt32 n = 0; n < nCount; n++)
+    {
+        OUString aNotebookBarItemNode(aAddonNotebookBarNode + 
aAddonNotebookBarNodeSeq[n]);
+        rAddonOfficeNotebookBarResNames.push_back(aAddonNotebookBarNodeSeq[n]);
+        rAddonOfficeNotebookBars.push_back(m_aEmptyAddonNotebookBar);
+        ReadNotebookBarItemSet(aNotebookBarItemNode, 
rAddonOfficeNotebookBars[n]);
+    }
+}
+
+bool AddonsOptions_Impl::ReadNotebookBarItemSet(
+    const OUString& rNotebookBarItemSetNodeName,
+    Sequence<Sequence<PropertyValue>>& rAddonOfficeNotebookBarSeq)
+{
+    sal_uInt32 nNotebookBarItemCount = rAddonOfficeNotebookBarSeq.getLength();
+    OUString aAddonNotebookBarItemSetNode(rNotebookBarItemSetNodeName + 
m_aPathDelimiter);
+    Sequence<OUString> aAddonNotebookBarItemSetNodeSeq = 
GetNodeNames(rNotebookBarItemSetNodeName);
+    Sequence<PropertyValue> aNotebookBarItem(PROPERTYCOUNT_NOTEBOOKBARITEM);
+
+    // Init the property value sequence
+    aNotebookBarItem[OFFSET_NOTEBOOKBARITEM_URL].Name = 
m_aPropNames[INDEX_URL];
+    aNotebookBarItem[OFFSET_NOTEBOOKBARITEM_TITLE].Name = 
m_aPropNames[INDEX_TITLE];
+    aNotebookBarItem[OFFSET_NOTEBOOKBARITEM_IMAGEIDENTIFIER].Name
+        = m_aPropNames[INDEX_IMAGEIDENTIFIER];
+    aNotebookBarItem[OFFSET_NOTEBOOKBARITEM_TARGET].Name = 
m_aPropNames[INDEX_TARGET];
+    aNotebookBarItem[OFFSET_NOTEBOOKBARITEM_CONTEXT].Name = 
m_aPropNames[INDEX_CONTEXT];
+    aNotebookBarItem[OFFSET_NOTEBOOKBARITEM_CONTROLTYPE].Name = 
m_aPropNames[INDEX_CONTROLTYPE];
+    aNotebookBarItem[OFFSET_NOTEBOOKBARITEM_WIDTH].Name = 
m_aPropNames[INDEX_WIDTH];
+    aNotebookBarItem[OFFSET_NOTEBOOKBARITEM_STYLE].Name = 
m_aPropNames[INDEX_STYLE];
+
+    sal_uInt32 nCount = aAddonNotebookBarItemSetNodeSeq.getLength();
+    for (sal_uInt32 n = 0; n < nCount; n++)
+    {
+        OUString aNotebookBarItemNode(aAddonNotebookBarItemSetNode
+                                      + aAddonNotebookBarItemSetNodeSeq[n]);
+        // Read the NotebookBarItem
+        if (ReadNotebookBarItem(aNotebookBarItemNode, aNotebookBarItem))
+        {
+            // Successfully read a toolbar item, append to our list
+            sal_uInt32 nAddonCount = rAddonOfficeNotebookBarSeq.getLength();
+            rAddonOfficeNotebookBarSeq.realloc(nAddonCount + 1);
+            rAddonOfficeNotebookBarSeq[nAddonCount] = aNotebookBarItem;
+        }
+    }
+
+    return (static_cast<sal_uInt32>(rAddonOfficeNotebookBarSeq.getLength())
+            > nNotebookBarItemCount);
+}
+
 void AddonsOptions_Impl::ReadImages( ImageManager& aImageManager )
 {
     // Read the user-defined Images set and fill image manager
@@ -925,6 +1082,90 @@ bool AddonsOptions_Impl::ReadMergeToolbarData( const 
OUString& aMergeAddonInstru
     return ReadToolBarItemSet( aMergeToolbarBaseNode, rMergeToolbarItems );
 }
 
+void AddonsOptions_Impl::ReadNotebookBarMergeInstructions(
+    NotebookBarMergingInstructions& rCachedNotebookBarMergingInstructions)
+{
+    const OUString 
aNotebookBarMergeRootName("AddonUI/OfficeNotebookBarMerging/");
+
+    Sequence<OUString> aAddonMergeNodesSeq = 
GetNodeNames(aNotebookBarMergeRootName);
+    sal_uInt32 nCount = aAddonMergeNodesSeq.getLength();
+
+    // Init the property value sequence
+    Sequence<OUString> aNodePropNames(6);
+
+    for (sal_uInt32 i = 0; i < nCount; i++)
+    {
+        OUString aMergeAddonInstructions(aNotebookBarMergeRootName + 
aAddonMergeNodesSeq[i]);
+
+        Sequence<OUString> aAddonInstMergeNodesSeq = 
GetNodeNames(aMergeAddonInstructions);
+        sal_uInt32 nCountAddons = aAddonInstMergeNodesSeq.getLength();
+
+        for (sal_uInt32 j = 0; j < nCountAddons; j++)
+        {
+            OUStringBuffer aMergeAddonInstructionBase(aMergeAddonInstructions);
+            aMergeAddonInstructionBase.append(m_aPathDelimiter);
+            aMergeAddonInstructionBase.append(aAddonInstMergeNodesSeq[j]);
+            aMergeAddonInstructionBase.append(m_aPathDelimiter);
+
+            // Create sequence for data access
+            OUStringBuffer aBuffer(aMergeAddonInstructionBase);
+            
aBuffer.append(m_aPropMergeNotebookBarNames[OFFSET_MERGENOTEBOOKBAR_NOTEBOOKBAR]);
+            aNodePropNames[0] = aBuffer.makeStringAndClear();
+
+            aBuffer = aMergeAddonInstructionBase;
+            
aBuffer.append(m_aPropMergeNotebookBarNames[OFFSET_MERGENOTEBOOKBAR_MERGEPOINT]);
+            aNodePropNames[1] = aBuffer.makeStringAndClear();
+
+            aBuffer = aMergeAddonInstructionBase;
+            
aBuffer.append(m_aPropMergeNotebookBarNames[OFFSET_MERGENOTEBOOKBAR_MERGECOMMAND]);
+            aNodePropNames[2] = aBuffer.makeStringAndClear();
+
+            aBuffer = aMergeAddonInstructionBase;
+            aBuffer.append(
+                
m_aPropMergeNotebookBarNames[OFFSET_MERGENOTEBOOKBAR_MERGECOMMANDPARAMETER]);
+            aNodePropNames[3] = aBuffer.makeStringAndClear();
+
+            aBuffer = aMergeAddonInstructionBase;
+            
aBuffer.append(m_aPropMergeNotebookBarNames[OFFSET_MERGENOTEBOOKBAR_MERGEFALLBACK]);
+            aNodePropNames[4] = aBuffer.makeStringAndClear();
+
+            aBuffer = aMergeAddonInstructionBase;
+            
aBuffer.append(m_aPropMergeNotebookBarNames[OFFSET_MERGENOTEBOOKBAR_MERGECONTEXT]);
+            aNodePropNames[5] = aBuffer.makeStringAndClear();
+
+            Sequence<Any> aNodePropValues = GetProperties(aNodePropNames);
+
+            MergeNotebookBarInstruction aMergeNotebookBarInstruction;
+            aNodePropValues[0] >>= 
aMergeNotebookBarInstruction.aMergeNotebookBar;
+            aNodePropValues[1] >>= aMergeNotebookBarInstruction.aMergePoint;
+            aNodePropValues[2] >>= aMergeNotebookBarInstruction.aMergeCommand;
+            aNodePropValues[3] >>= 
aMergeNotebookBarInstruction.aMergeCommandParameter;
+            aNodePropValues[4] >>= aMergeNotebookBarInstruction.aMergeFallback;
+            aNodePropValues[5] >>= aMergeNotebookBarInstruction.aMergeContext;
+
+            
ReadMergeNotebookBarData(aMergeAddonInstructionBase.makeStringAndClear(),
+                                     
aMergeNotebookBarInstruction.aMergeNotebookBarItems);
+
+            MergeNotebookBarInstructionContainer& rVector
+                = 
rCachedNotebookBarMergingInstructions[aMergeNotebookBarInstruction
+                                                            
.aMergeNotebookBar];
+            rVector.push_back(aMergeNotebookBarInstruction);
+        }
+    }
+}
+
+bool AddonsOptions_Impl::ReadMergeNotebookBarData(
+    const OUString& aMergeAddonInstructionBase,
+    Sequence<Sequence<PropertyValue>>& rMergeNotebookBarItems)
+{
+    OUStringBuffer aBuffer(aMergeAddonInstructionBase);
+    
aBuffer.append(m_aPropMergeNotebookBarNames[OFFSET_MERGENOTEBOOKBAR_NOTEBOOKBARITEMS]);
+
+    OUString aMergeNotebookBarBaseNode = aBuffer.makeStringAndClear();
+
+    return ReadNotebookBarItemSet(aMergeNotebookBarBaseNode, 
rMergeNotebookBarItems);
+}
+
 void AddonsOptions_Impl::ReadStatusbarMergeInstructions( 
MergeStatusbarInstructionContainer& aContainer )
 {
     const OUString aStatusbarMergeRootName( "AddonUI/OfficeStatusbarMerging/" 
);
@@ -1233,6 +1474,61 @@ bool AddonsOptions_Impl::ReadToolBarItem( const 
OUString& aToolBarItemNodeName,
     return bResult;
 }
 
+bool AddonsOptions_Impl::ReadNotebookBarItem( const OUString& 
aNotebookBarItemNodeName, Sequence< PropertyValue >& aNotebookBarItem )
+{
+    bool             bResult = false;
+    OUString         aTitle;
+    OUString         aURL;
+    OUString         aAddonNotebookBarItemTreeNode( aNotebookBarItemNodeName + 
m_aPathDelimiter );
+
+    Sequence< Any >  aNotebookBarItemNodePropValues = GetProperties( 
GetPropertyNamesNotebookBarItem( aAddonNotebookBarItemTreeNode ) );
+
+    // A toolbar item must have a command URL
+    if (( aNotebookBarItemNodePropValues[ OFFSET_NOTEBOOKBARITEM_URL ] >>= 
aURL ) && !aURL.isEmpty() )
+    {
+        if ( aURL == SEPARATOR_URL )
+        {
+            // A separator toolbar item only needs a URL
+            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_URL                
].Value <<= aURL;
+            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_TITLE              
].Value <<= OUString();
+            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_TARGET             
].Value <<= OUString();
+            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_IMAGEIDENTIFIER    
].Value <<= OUString();
+            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_CONTEXT            
].Value <<= OUString();
+            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_CONTROLTYPE        
].Value <<= OUString();
+            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_WIDTH              
].Value <<= sal_Int32( 0 );
+            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_STYLE              
].Value <<= OUString();
+
+            bResult = true;
+        }
+        else if (( aNotebookBarItemNodePropValues[ 
OFFSET_NOTEBOOKBARITEM_TITLE ] >>= aTitle ) && !aTitle.isEmpty() )
+        {
+            // A normal toolbar item must also have title => read the other 
properties;
+            OUString aImageId;
+
+            // Try to map a user-defined image URL to our internal private 
image URL
+            aNotebookBarItemNodePropValues[ 
OFFSET_NOTEBOOKBARITEM_IMAGEIDENTIFIER ] >>= aImageId;
+            ReadAndAssociateImages( aURL, aImageId );
+
+            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_URL                
].Value <<= aURL;
+            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_TITLE              
].Value <<= aTitle;
+            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_TARGET             
].Value = aNotebookBarItemNodePropValues[ OFFSET_NOTEBOOKBARITEM_TARGET      ];
+            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_IMAGEIDENTIFIER    
].Value <<= aImageId;
+            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_CONTEXT            
].Value = aNotebookBarItemNodePropValues[ OFFSET_NOTEBOOKBARITEM_CONTEXT     ];
+            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_CONTROLTYPE        
].Value = aNotebookBarItemNodePropValues[ OFFSET_NOTEBOOKBARITEM_CONTROLTYPE ];
+
+            // Configuration uses hyper for long. Therefore transform into 
sal_Int32
+            sal_Int64 nValue( 0 );
+            aNotebookBarItemNodePropValues[ OFFSET_NOTEBOOKBARITEM_WIDTH ] >>= 
nValue;
+            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_WIDTH              
].Value <<= sal_Int32( nValue );
+            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_STYLE              
].Value = aNotebookBarItemNodePropValues[ OFFSET_NOTEBOOKBARITEM_STYLE ];
+
+            bResult = true;
+        }
+    }
+
+    return bResult;
+}
+
 void AddonsOptions_Impl::ReadSubMenuEntries( const Sequence< OUString >& 
aSubMenuNodeNames, Sequence< Sequence< PropertyValue > >& rSubMenuSeq )
 {
     Sequence< PropertyValue > aMenuItem( PROPERTYCOUNT_MENUITEM );
@@ -1438,6 +1734,23 @@ Sequence< OUString > 
AddonsOptions_Impl::GetPropertyNamesToolBarItem( const OUSt
     return lResult;
 }
 
+Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesNotebookBarItem( 
const OUString& aPropertyRootNode ) const
+{
+    Sequence< OUString > lResult( PROPERTYCOUNT_NOTEBOOKBARITEM );
+
+    // Create property names dependent from the root node name
+    lResult[0] = aPropertyRootNode + m_aPropNames[ INDEX_URL             ];
+    lResult[1] = aPropertyRootNode + m_aPropNames[ INDEX_TITLE       ];
+    lResult[2] = aPropertyRootNode + m_aPropNames[ INDEX_IMAGEIDENTIFIER];
+    lResult[3] = aPropertyRootNode + m_aPropNames[ INDEX_TARGET          ];
+    lResult[4] = aPropertyRootNode + m_aPropNames[ INDEX_CONTEXT         ];
+    lResult[5] = aPropertyRootNode + m_aPropNames[ INDEX_CONTROLTYPE     ];
+    lResult[6] = aPropertyRootNode + m_aPropNames[ INDEX_WIDTH       ];
+    lResult[7] = aPropertyRootNode + m_aPropNames[ INDEX_STYLE       ];
+
+    return lResult;
+}
+
 Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesStatusbarItem(
     const OUString& aPropertyRootNode ) const
 {
@@ -1516,6 +1829,14 @@ sal_Int32 AddonsOptions::GetAddonsToolBarCount() const
 
 //  public method
 
+sal_Int32 AddonsOptions::GetAddonsNotebookBarCount() const
+{
+    MutexGuard aGuard( GetOwnStaticMutex() );
+    return m_pImpl->GetAddonsNotebookBarCount();
+}
+
+//  public method
+
 const Sequence< Sequence< PropertyValue > >& AddonsOptions::GetAddonsMenu() 
const
 {
     MutexGuard aGuard( GetOwnStaticMutex() );
@@ -1540,6 +1861,14 @@ const Sequence< Sequence< PropertyValue > >& 
AddonsOptions::GetAddonsToolBarPart
 
 //  public method
 
+const Sequence< Sequence< PropertyValue > >& 
AddonsOptions::GetAddonsNotebookBarPart( sal_uInt32 nIndex ) const
+{
+    MutexGuard aGuard( GetOwnStaticMutex() );
+    return m_pImpl->GetAddonsNotebookBarPart( nIndex );
+}
+
+//  public method
+
 const OUString AddonsOptions::GetAddonsToolbarResourceName( sal_uInt32 nIndex 
) const
 {
     MutexGuard aGuard( GetOwnStaticMutex() );
@@ -1548,6 +1877,14 @@ const OUString 
AddonsOptions::GetAddonsToolbarResourceName( sal_uInt32 nIndex )
 
 //  public method
 
+const OUString AddonsOptions::GetAddonsNotebookBarResourceName( sal_uInt32 
nIndex ) const
+{
+    MutexGuard aGuard( GetOwnStaticMutex() );
+    return m_pImpl->GetAddonsNotebookBarResourceName( nIndex );
+}
+
+//  public method
+
 const Sequence< Sequence< PropertyValue > >& 
AddonsOptions::GetAddonsHelpMenu() const
 {
     MutexGuard aGuard( GetOwnStaticMutex() );
@@ -1573,6 +1910,19 @@ bool AddonsOptions::GetMergeToolbarInstructions(
         rToolbarName, rToolbarInstructions );
 }
 
+//  public method
+
+bool AddonsOptions::GetMergeNotebookBarInstructions(
+    const OUString& rNotebookBarName,
+    MergeNotebookBarInstructionContainer& rNotebookBarInstructions ) const
+{
+    MutexGuard aGuard( GetOwnStaticMutex() );
+    return m_pImpl->GetMergeNotebookBarInstructions(
+        rNotebookBarName, rNotebookBarInstructions );
+}
+
+//public method
+
 const MergeStatusbarInstructionContainer& 
AddonsOptions::GetMergeStatusbarInstructions() const
 {
     MutexGuard aGuard( GetOwnStaticMutex() );
diff --git a/include/framework/addonsoptions.hxx 
b/include/framework/addonsoptions.hxx
index 8a96f25970b7..ca7a464b61a0 100644
--- a/include/framework/addonsoptions.hxx
+++ b/include/framework/addonsoptions.hxx
@@ -68,6 +68,19 @@ struct FWE_DLLPUBLIC MergeToolbarInstruction
 
 typedef ::std::vector< MergeToolbarInstruction > 
MergeToolbarInstructionContainer;
 
+struct FWE_DLLPUBLIC MergeNotebookBarInstruction
+{
+    OUString     aMergeNotebookBar;
+    OUString     aMergePoint;
+    OUString     aMergeCommand;
+    OUString     aMergeCommandParameter;
+    OUString     aMergeFallback;
+    OUString     aMergeContext;
+    css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > 
aMergeNotebookBarItems;
+};
+
+typedef ::std::vector< MergeNotebookBarInstruction >    
MergeNotebookBarInstructionContainer;
+
 struct FWE_DLLPUBLIC MergeStatusbarInstruction
 {
     OUString     aMergePoint;
@@ -117,6 +130,14 @@ class FWE_DLLPUBLIC AddonsOptions
         sal_Int32   GetAddonsToolBarCount() const ;
 
         
/*-****************************************************************************************************
+            @short      returns number of addons notebookbar
+            @descr      Call to retrieve the number of addons notebookbar
+
+            @return     number of addons notebookar
+        
*//*-*****************************************************************************************************/
+        sal_Int32   GetAddonsNotebookBarCount() const ;
+
+        
/*-****************************************************************************************************
             @short      returns the  complete addons menu
             @descr      Call it to get all entries of the addon menu.
                         We return a list of all nodes with its names and 
properties.
@@ -155,6 +176,24 @@ class FWE_DLLPUBLIC AddonsOptions
         const OUString GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const;
 
         
/*-****************************************************************************************************
+            @short      Gets a NotebookBar part of an single addon
+            @return     A complete
+
+            @onerror    We return sal_False
+        
*//*-*****************************************************************************************************/
+
+        const css::uno::Sequence< css::uno::Sequence< 
css::beans::PropertyValue > >& GetAddonsNotebookBarPart( sal_uInt32 nIndex ) 
const;
+
+        
/*-****************************************************************************************************
+            @short      Gets a unique NotebookBar resource name of an single 
addon
+            @return     A complete
+
+            @onerror    We return sal_False
+        
*//*-*****************************************************************************************************/
+
+        const OUString GetAddonsNotebookBarResourceName( sal_uInt32    ) const;
+
+        
/*-****************************************************************************************************
             @short      Retrieves all available merge instructions for the 
Office menu bar
             @return     The filled MergeMenuDefinitionContaier
 
@@ -172,6 +211,14 @@ class FWE_DLLPUBLIC AddonsOptions
         bool GetMergeToolbarInstructions( const OUString& rToolbarName, 
MergeToolbarInstructionContainer& rToolbar ) const;
 
         
/*-****************************************************************************************************
+            @short      Retrieves all available merge instructions for 
Notebookbar
+            @return     The filled
+
+            @onerror    We return sal_False
+        
*//*-*****************************************************************************************************/
+        bool GetMergeNotebookBarInstructions( const OUString& 
rNotebookBarName, MergeNotebookBarInstructionContainer& rNotebookBar ) const;
+
+        
/*-****************************************************************************************************
             @short      Gets the Add-On help menu part of all addon components 
registered
             @return     A complete
 
diff --git a/officecfg/registry/schema/org/openoffice/Office/Addons.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Addons.xcs
index 2f83bcfd8c23..42643cddd245 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Addons.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Addons.xcs
@@ -295,6 +295,91 @@
         <value>0</value>
       </prop>
     </group>
+    <group oor:name="MergeNotebookBarInstruction">
+      <info>
+        <desc>Describes a merge menu instruction of an external component. The 
name must be unique and should be written using a package-scheme like 
org.openoffice.external.applicationexecuter to minimize name clashes. A menu 
instruction describes how the attached menu items should be merged into the 
Office menubar.</desc>
+      </info>
+      <prop oor:name="MergeNotebookBar" oor:type="xs:string">
+        <info>
+          <desc>Defines the notebookbar interface.</desc>
+        </info>
+      </prop>
+      <prop oor:name="MergePoint" oor:type="xs:string">
+        <info>
+          <desc>Describes the command that should be used as a reference point 
for the merge command.</desc>
+        </info>
+      </prop>
+      <prop oor:name="MergeCommand" oor:type="xs:string">
+        <info>
+          <desc>A command to be processed for this merge menu 
instruction.</desc>
+        </info>
+      </prop>
+      <prop oor:name="MergeCommandParameter" oor:type="xs:string">
+        <info>
+          <desc>Optional parameters for a merge command. Interpretation 
depends on the individual command.</desc>
+        </info>
+      </prop>
+      <prop oor:name="MergeFallback" oor:type="xs:string">
+        <info>
+          <desc>A fallback command to be used if MergeCommand cannot be 
applied.</desc>
+        </info>
+      </prop>
+      <prop oor:name="MergeContext" oor:type="xs:string">
+        <info>
+          <desc>A property to define the context of this merge instruction. It 
can be empty or a colon separated list of the supported application 
modules.</desc>
+        </info>
+      </prop>
+      <set oor:name="NotebookBarItems" oor:node-type="NotebookBarItem">
+        <info>
+          <desc>Contains a list of notebookbar items used by an Add-On.</desc>
+        </info>
+      </set>
+    </group>
+    <group oor:name="NotebookBarItem">
+      <info>
+        <desc>Describes a toolbar item representing a function of an external 
component. The name must be unique and should be written using a package-scheme 
like org.openoffice.external.applicationexecuter to minimize name 
clashes.</desc>
+      </info>
+      <prop oor:name="URL" oor:type="xs:string">
+        <info>
+          <desc>A command URL which represents the function to execute.</desc>
+        </info>
+      </prop>
+      <prop oor:name="Title" oor:type="xs:string" oor:localized="true">
+        <info>
+          <desc>A localized string used to as the menu item title.</desc>
+        </info>
+      </prop>
+      <prop oor:name="ImageIdentifier" oor:type="xs:string">
+        <info>
+          <desc>A private URL used to reference an optional internal menu 
image. Example: private:image/3216 addresses the internal Office image with 
id=3216.</desc>
+        </info>
+      </prop>
+      <prop oor:name="Target" oor:type="xs:string">
+        <info>
+          <desc>This is the target URL which is used for the dispatch command. 
There are special URL's to address certain targets: _self, current frame; 
_default, default; _blank, create new frame.</desc>
+        </info>
+      </prop>
+      <prop oor:name="Context" oor:type="xs:string">
+        <info>
+          <desc>A property to define the context of a notebookbar item. It can 
be empty or a colon separated list of the supported application modules.</desc>
+        </info>
+      </prop>
+      <prop oor:name="ControlType" oor:type="xs:string">
+        <info>
+          <desc>A property to define the control type of the notebookbar item. 
It will be interpreted as OpenOffice.org default toggle button.</desc>
+        </info>
+      </prop>
+      <prop oor:name="Width" oor:type="xs:long">
+        <info>
+          <desc>A property to define the size of a toolbar item. This property 
works only ControlTypes which can have a dynamic size (e.g. comboboxes, edit 
fields, spin fields)</desc>
+        </info>
+      </prop>
+      <prop oor:name="Style" oor:type="xs:string">
+        <info>
+          <desc>A property to define the style of item in a notebookbar (e.g  
text, icon, text + icon)</desc>
+        </info>
+      </prop>
+    </group>
     <group oor:name="UserDefinedImages">
       <info>
         <desc>A group of optional user-defined images. There are two ways to 
define image - 1. Embed the image data directly into the configuration. 2. Use 
file URLs to address external bitmap files. Embedded image data has a higher 
priority than file URLs.</desc>
@@ -365,6 +450,11 @@
         <desc>Contains a list of merge menu instructions defined by an Add-On 
which specify how to merge menu items into the Office menubar.</desc>
       </info>
     </set>
+    <set oor:name="NotebookBarItems" oor:node-type="NotebookBarItem">
+      <info>
+        <desc>Contains a list of notebookbar items used by an Add-On.</desc>
+      </info>
+    </set>
     <set oor:name="MergeToolBarItems" oor:node-type="MergeToolBarInstruction">
       <info>
         <desc>Contains a list of merge toolbar instructions defined by an 
Add-On which specify how to merge toolbar items into an existing toolbar.</desc>
@@ -375,6 +465,11 @@
         <desc>Contains a list of merge status bar instructions defined by an 
Add-On which specify how to merge status bar items into an existing status 
bar.</desc>
       </info>
     </set>
+    <set oor:name="MergeNotebookBarItems" 
oor:node-type="MergeNotebookBarInstruction">
+      <info>
+        <desc>Contains a list of merge notebookbar instructions defined by an 
Add-On which specify how to merge notebookbar items into an existing 
toolbar.</desc>
+      </info>
+    </set>
   </templates>
   <component>
     <group oor:name="AddonUI">
@@ -421,6 +516,16 @@
           <desc>Contains a list of functions inserted into the Office help 
menu. The optional property 'Submenu' will be ignored for this set.</desc>
         </info>
       </set>
+      <set oor:name="OfficeNotebookBar" oor:node-type="NotebookBarItems">
+        <info>
+          <desc>Contains a list of sets of notebookbar items that are part of 
add-on notebookbar.</desc>
+        </info>
+      </set>
+      <set oor:name="OfficeNotebookBarMerging" 
oor:node-type="MergeNotebookBarItems">
+        <info>
+          <desc>Contains a list of notebookbar merging instructions of 
different add-ons. </desc>
+        </info>
+      </set>
     </group>
   </component>
 </oor:component-schema>
commit e6d23c144ccadbd962b5dfb953bf29e49a7f64a3
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Jul 19 09:52:08 2019 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Jul 19 11:47:47 2019 +0200

    loplugin:referencecasting in cppcanvas..cui
    
    Change-Id: Ib8a513d88575cef9c1479b91adff98170c9323e8
    Reviewed-on: https://gerrit.libreoffice.org/75937
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/cppcanvas/source/wrapper/implbitmapcanvas.cxx 
b/cppcanvas/source/wrapper/implbitmapcanvas.cxx
index f8b0b666db5a..67ca17a6e3c4 100644
--- a/cppcanvas/source/wrapper/implbitmapcanvas.cxx
+++ b/cppcanvas/source/wrapper/implbitmapcanvas.cxx
@@ -36,8 +36,7 @@ namespace cppcanvas
     namespace internal
     {
         ImplBitmapCanvas::ImplBitmapCanvas( const uno::Reference< 
rendering::XBitmapCanvas >& rCanvas ) :
-            ImplCanvas( uno::Reference< rendering::XCanvas >(rCanvas,
-                                                             uno::UNO_QUERY) ),
+            ImplCanvas( rCanvas ),
             mxBitmapCanvas( rCanvas ),
             mxBitmap( rCanvas,
                       uno::UNO_QUERY )
diff --git a/cppcanvas/source/wrapper/implcustomsprite.cxx 
b/cppcanvas/source/wrapper/implcustomsprite.cxx
index 492f6d3de8fc..9aa56211474c 100644
--- a/cppcanvas/source/wrapper/implcustomsprite.cxx
+++ b/cppcanvas/source/wrapper/implcustomsprite.cxx
@@ -34,8 +34,7 @@ namespace cppcanvas
                                             const uno::Reference< 
rendering::XCustomSprite >&       rSprite,
                                             const 
ImplSpriteCanvas::TransformationArbiterSharedPtr& rTransformArbiter ) :
             ImplSprite( rParentCanvas,
-                        uno::Reference< rendering::XSprite >(rSprite,
-                                                             uno::UNO_QUERY),
+                        rSprite,
                         rTransformArbiter ),
             mpLastCanvas(),
             mxCustomSprite( rSprite )
diff --git a/cppcanvas/source/wrapper/implspritecanvas.cxx 
b/cppcanvas/source/wrapper/implspritecanvas.cxx
index 15452f5dbb41..d9b6ee7075fc 100644
--- a/cppcanvas/source/wrapper/implspritecanvas.cxx
+++ b/cppcanvas/source/wrapper/implspritecanvas.cxx
@@ -45,8 +45,7 @@ namespace cppcanvas
 
 
         ImplSpriteCanvas::ImplSpriteCanvas( const uno::Reference< 
rendering::XSpriteCanvas >& rCanvas ) :
-            ImplCanvas( uno::Reference< rendering::XCanvas >(rCanvas,
-                                                             uno::UNO_QUERY) ),
+            ImplCanvas( rCanvas ),
             mxSpriteCanvas( rCanvas ),
             mpTransformArbiter( new TransformationArbiter() )
         {
diff --git a/cppcanvas/source/wrapper/vclfactory.cxx 
b/cppcanvas/source/wrapper/vclfactory.cxx
index f013aef5b92c..3cf795fe0c42 100644
--- a/cppcanvas/source/wrapper/vclfactory.cxx
+++ b/cppcanvas/source/wrapper/vclfactory.cxx
@@ -55,9 +55,7 @@ namespace cppcanvas
     {
         return SpriteCanvasSharedPtr(
             new internal::ImplSpriteCanvas(
-                uno::Reference< rendering::XSpriteCanvas >(
-                    rVCLWindow.GetSpriteCanvas(),
-                    uno::UNO_QUERY) ) );
+                    rVCLWindow.GetSpriteCanvas() ) );
     }
 
     SpriteCanvasSharedPtr VCLFactory::createSpriteCanvas( const 
uno::Reference< rendering::XSpriteCanvas >& xCanvas )
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx
index 51f336999050..a14cf6010aa8 100644
--- a/cppuhelper/source/propshlp.cxx
+++ b/cppuhelper/source/propshlp.cxx
@@ -235,7 +235,7 @@ css::uno::Sequence< css::uno::Type > 
OPropertySetHelper::getTypes()
 void OPropertySetHelper::disposing()
 {
     // Create an event with this as sender
-    Reference < XPropertySet  > rSource( static_cast< XPropertySet *  >(this), 
UNO_QUERY );
+    Reference < XPropertySet  > rSource = this;
     EventObject aEvt;
     aEvt.Source = rSource;
 
diff --git a/cui/source/customize/CommandCategoryListBox.cxx 
b/cui/source/customize/CommandCategoryListBox.cxx
index 382852a56b9e..937916ec3ea6 100644
--- a/cui/source/customize/CommandCategoryListBox.cxx
+++ b/cui/source/customize/CommandCategoryListBox.cxx
@@ -528,7 +528,7 @@ void CommandCategoryListBox::addChildren(
 
             OUString uri, description;
 
-            css::uno::Reference < css::beans::XPropertySet >xPropSet( 
child.get(), css::uno::UNO_QUERY );
+            css::uno::Reference < css::beans::XPropertySet >xPropSet( child, 
css::uno::UNO_QUERY );
 
             if (!xPropSet.is())
             {
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index d12c2a97bad5..c71d0d3911ed 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -1354,9 +1354,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, LoadHdl, 
sfx2::FileDialogHelper*, void
             xComponent.set(xCfgMgr, uno::UNO_QUERY);
             if (xComponent.is())
                 xComponent->dispose();
-            xComponent.set(xRootStorage, uno::UNO_QUERY);
-            if (xComponent.is())
-                xComponent->dispose();
+            xRootStorage->dispose();
         }
     }
     catch(const uno::RuntimeException&)
@@ -1430,12 +1428,9 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, SaveHdl, 
sfx2::FileDialogHelper*, void
 
         if (xRootStorage.is())
         {
-            uno::Reference<lang::XComponent> xComponent(xCfgMgr, 
uno::UNO_QUERY);
-            if (xComponent.is())
-                xComponent->dispose();
-            xComponent.set(xRootStorage, uno::UNO_QUERY);
-            if (xComponent.is())
-                xComponent->dispose();
+            if (xCfgMgr.is())
+                xCfgMgr->dispose();
+            xRootStorage->dispose();
         }
     }
     catch(const uno::RuntimeException&)
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index b6d9bb2a5c61..4d3c1e28ad1d 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -568,7 +568,7 @@ bool MenuSaveInData::Apply()
     if ( IsModified() )
     {
         // Apply new menu bar structure to our settings container
-        m_xMenuSettings.set( GetConfigManager()->createSettings(), 
uno::UNO_QUERY );
+        m_xMenuSettings = GetConfigManager()->createSettings();
 
         uno::Reference< container::XIndexContainer > xIndexContainer (
             m_xMenuSettings, uno::UNO_QUERY );
@@ -871,7 +871,7 @@ bool ContextMenuSaveInData::Apply()
     {
         if ( pEntry->IsModified() || 
SvxConfigPageHelper::SvxConfigEntryModified( pEntry ) )
         {
-            css::uno::Reference< css::container::XIndexContainer > 
xIndexContainer( GetConfigManager()->createSettings(), css::uno::UNO_QUERY );
+            css::uno::Reference< css::container::XIndexContainer > 
xIndexContainer = GetConfigManager()->createSettings();
             css::uno::Reference< css::lang::XSingleComponentFactory > 
xFactory( xIndexContainer, css::uno::UNO_QUERY );
             ApplyMenu( xIndexContainer, xFactory, pEntry );
 
@@ -2400,8 +2400,8 @@ void ToolbarSaveInData::ApplyToolbar(
 void ToolbarSaveInData::ApplyToolbar( SvxConfigEntry* pToolbar )
 {
     // Apply new toolbar structure to our settings container
-    uno::Reference< container::XIndexAccess > xSettings(
-        GetConfigManager()->createSettings(), uno::UNO_QUERY );
+    uno::Reference< container::XIndexAccess > xSettings =
+        GetConfigManager()->createSettings();
 
     uno::Reference< container::XIndexContainer > xIndexContainer (
         xSettings, uno::UNO_QUERY );
@@ -2449,7 +2449,7 @@ void ToolbarSaveInData::CreateToolbar( SvxConfigEntry* 
pToolbar )
 {
     // show the new toolbar in the UI also
     uno::Reference< container::XIndexAccess >
-        xSettings( GetConfigManager()->createSettings(), uno::UNO_QUERY );
+        xSettings = GetConfigManager()->createSettings();
 
     uno::Reference< beans::XPropertySet >
         xPropertySet( xSettings, uno::UNO_QUERY );
@@ -2892,11 +2892,9 @@ IMPL_LINK_NOARG(SvxIconSelectorDialog, DeleteHdl, 
weld::Button&, void)
         uno::Sequence< OUString > URLs { aSelImageText };
         m_xTbSymbol->RemoveItem(nId);
         m_xImportedImageManager->removeImages( 
SvxConfigPageHelper::GetImageType(), URLs );
-        uno::Reference< css::ui::XUIConfigurationPersistence >
-            xConfigPersistence( m_xImportedImageManager, uno::UNO_QUERY );
-        if ( xConfigPersistence.is() && xConfigPersistence->isModified() )
+        if ( m_xImportedImageManager->isModified() )
         {
-            xConfigPersistence->store();
+            m_xImportedImageManager->store();
         }
     }
 }
@@ -2906,8 +2904,6 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem(
 {
     uno::Sequence< OUString > URLs(1);
     uno::Sequence< uno::Reference<graphic::XGraphic > > aImportGraph( 1 );
-    uno::Reference< css::ui::XUIConfigurationPersistence >
-        xConfigPer( m_xImportedImageManager, uno::UNO_QUERY );
 
     uno::Reference< graphic::XGraphic > xGraphic;
     uno::Sequence< beans::PropertyValue > aMediaProps( 1 );
@@ -2964,7 +2960,7 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem(
                 URLs[0] = aURL;
                 aImportGraph[ 0 ] = xGraphic;
                 m_xImportedImageManager->replaceImages( 
SvxConfigPageHelper::GetImageType(), URLs, aImportGraph );
-                xConfigPer->store();
+                m_xImportedImageManager->store();
 
                 bResult = true;
                 break;
@@ -3157,12 +3153,9 @@ bool SvxIconSelectorDialog::ImportGraphic( const 
OUString& aURL )
                 uno::Sequence< uno::Reference<graphic::XGraphic > > 
aImportGraph( 1 );
                 aImportGraph[ 0 ] = xGraphic;
                 m_xImportedImageManager->insertImages( 
SvxConfigPageHelper::GetImageType(), aImportURL, aImportGraph );
-                uno::Reference< css::ui::XUIConfigurationPersistence >
-                xConfigPersistence( m_xImportedImageManager, uno::UNO_QUERY );
-
-                if ( xConfigPersistence.is() && 
xConfigPersistence->isModified() )
+                if ( m_xImportedImageManager->isModified() )
                 {
-                    xConfigPersistence->store();
+                    m_xImportedImageManager->store();
                 }
 
                 result = true;
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 7a58aa96ab77..2c0c1e6ac506 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -376,7 +376,7 @@ namespace
         {
             Reference< XScriptInvocationContext > xContext( _rxComponent, 
UNO_QUERY );
             if ( xContext.is() )
-                xScripts.set( xContext->getScriptContainer(), UNO_QUERY );
+                xScripts = xContext->getScriptContainer();
         }
 
         return Reference< XModel >( xScripts, UNO_QUERY );
diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 52671b110586..9c6e90b74c25 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -545,7 +545,7 @@ IMPL_LINK_NOARG(SpellDialog, ChangeAllHdl, weld::Button&, 
void)
     // add new word to ChangeAll list
     OUString  aOldWord( m_xSentenceED->GetErrorText() );
     SvxPrepareAutoCorrect( aOldWord, aString );
-    Reference<XDictionary> aXDictionary( LinguMgr::GetChangeAllList(), 
UNO_QUERY );
+    Reference<XDictionary> aXDictionary = LinguMgr::GetChangeAllList();
     DictionaryError nAdded = AddEntryToDic( aXDictionary,
             aOldWord, true,
             aString );
@@ -568,7 +568,7 @@ IMPL_LINK( SpellDialog, IgnoreAllHdl, weld::Button&, 
rButton, void )
 {
     m_xSentenceED->UndoActionStart( SPELLUNDO_CHANGE_GROUP );
     // add word to IgnoreAll list
-    Reference< XDictionary > aXDictionary( LinguMgr::GetIgnoreAllList(), 
UNO_QUERY );
+    Reference< XDictionary > aXDictionary = LinguMgr::GetIgnoreAllList();
     //in case the error has been changed manually it has to be restored
     m_xSentenceED->RestoreCurrentError();
     if (&rButton == m_xIgnoreRulePB.get())
@@ -780,7 +780,7 @@ int SpellDialog::InitUserDicts()
     sal_uInt16 nItemId = 1;     // menu items should be enumerated from 1 and 
not 0
     for (sal_Int32 i = 0; i < nSize; ++i)
     {
-        uno::Reference< linguistic2::XDictionary >  xDicTmp( pDic[i], 
uno::UNO_QUERY );
+        uno::Reference< linguistic2::XDictionary >  xDicTmp = pDic[i];
         if (!xDicTmp.is() || LinguMgr::GetIgnoreAllList() == xDicTmp)
             continue;
 
@@ -1082,7 +1082,7 @@ bool SpellDialog::ApplyChangeAllList_Impl(SpellPortions& 
rSentence, bool &bHasRe
 {
     bHasReplaced = false;
     bool bRet = true;
-    Reference<XDictionary> xChangeAll( LinguMgr::GetChangeAllList(), UNO_QUERY 
);
+    Reference<XDictionary> xChangeAll = LinguMgr::GetChangeAllList();
     if(!xChangeAll->getCount())
         return bRet;
     bRet = false;
@@ -1585,7 +1585,7 @@ bool SentenceEditWindow_Impl::MarkNextError( bool 
bIgnoreCurrentError, const css
         nCursor = nMinPos;
 
         // maybe the error found here is already in the ChangeAllList and has 
to be replaced
-        Reference<XDictionary> xChangeAll( LinguMgr::GetChangeAllList(), 
UNO_QUERY );
+        Reference<XDictionary> xChangeAll = LinguMgr::GetChangeAllList();
         Reference<XDictionaryEntry> xEntry;
 
         if (xChangeAll->getCount() && pSpellErrorDescription &&
diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index 1f097367a1d5..50df1eff94c0 100644
--- a/cui/source/dialogs/hlmarkwn.cxx
+++ b/cui/source/dialogs/hlmarkwn.cxx
@@ -233,15 +233,14 @@ bool SvxHlinkDlgMarkWnd::RefreshFromDoc(const OUString& 
aURL)
     if( !aURL.isEmpty() )
     {
         // load from url
-        uno::Reference< frame::XComponentLoader > xLoader( xDesktop, 
uno::UNO_QUERY );
-        if( xLoader.is() )
+        if( xDesktop.is() )
         {
             try
             {
                 uno::Sequence< beans::PropertyValue > aArg(1);
                 aArg.getArray()[0].Name = "Hidden";
                 aArg.getArray()[0].Value <<= true;
-                xComp = xLoader->loadComponentFromURL( aURL, "_blank", 0, aArg 
);
+                xComp = xDesktop->loadComponentFromURL( aURL, "_blank", 0, 
aArg );
             }
             catch( const io::IOException& )
             {
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index ab4711eb1a2f..adbb6489f551 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -154,7 +154,7 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl, 
weld::Button&, void)
         {
             lang::Locale aLocale( LanguageTag::convertToLocale(nLang) );
             OUString aURL( linguistic::GetWritableDictionaryURL( sDict ) );
-            m_xNewDic.set(xDicList->createDictionary(sDict, aLocale, eType, 
aURL) , UNO_QUERY);
+            m_xNewDic = xDicList->createDictionary(sDict, aLocale, eType, 
aURL);
             m_xNewDic->setActive(true);
         }
         DBG_ASSERT(m_xNewDic.is(), "NULL pointer");
@@ -172,7 +172,7 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl, 
weld::Button&, void)
 
     if (xDicList.is() && m_xNewDic.is())
     {
-        xDicList->addDictionary(Reference<XDictionary>(m_xNewDic, UNO_QUERY));
+        xDicList->addDictionary(m_xNewDic);
 
         // refresh list of dictionaries
         //! dictionaries may have been added/removed elsewhere too.
@@ -253,7 +253,7 @@ 
SvxEditDictionaryDialog::SvxEditDictionaryDialog(weld::Window* pParent, const OU
     OUString aLookUpEntry;
     for ( sal_Int32 i = 0; i < nCount; ++i )
     {
-        Reference< XDictionary >  xDic( pDic[i], UNO_QUERY );
+        Reference< XDictionary >  xDic = pDic[i];
         if (xDic.is())
         {
             bool bNegative = xDic->getDictionaryType() == 
DictionaryType_NEGATIVE;
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 3280514c63d7..c915ec25ad69 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1374,7 +1374,7 @@ IMPL_LINK(SvxLinguTabPage, ClickHdl_Impl, weld::Button&, 
rBtn, void)
         ScopedVclPtr<AbstractSvxNewDictionaryDialog> 
aDlg(pFact->CreateSvxNewDictionaryDialog(GetDialogFrameWeld()));
         uno::Reference< XDictionary >  xNewDic;
         if ( aDlg->Execute() == RET_OK )
-            xNewDic.set( aDlg->GetNewDictionary(), UNO_QUERY );
+            xNewDic = aDlg->GetNewDictionary();
         if ( xNewDic.is() )
         {
             // add new dics to the end
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 83f3a37855dc..701f159487c8 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -2069,16 +2069,12 @@ void ExtensionsTabPage::dispose()
 
     if ( m_xPage.is() )
     {
-        Reference< XComponent > xComponent( m_xPage, UNO_QUERY );
-        if ( xComponent.is() )
+        try
+        {
+            m_xPage->dispose();
+        }
+        catch ( const Exception & )
         {
-            try
-            {
-                xComponent->dispose();
-            }
-            catch ( const Exception & )
-            {
-            }
         }
         m_xPage.clear();
     }
@@ -2101,9 +2097,9 @@ void ExtensionsTabPage::CreateDialogWithHandler()
         {
             SetStyle( GetStyle() | WB_DIALOGCONTROL | WB_CHILDDLGCTRL );
             Reference< awt::XWindowPeer > xParent( VCLUnoHelper::GetInterface( 
this ), UNO_QUERY );
-            m_xPage.set(
+            m_xPage =
                 m_xWinProvider->createContainerWindow(
-                    m_sPageURL, OUString(), xParent, m_xEventHdl ), UNO_QUERY 
);
+                    m_sPageURL, OUString(), xParent, m_xEventHdl );
 
             Reference< awt::XControl > xPageControl( m_xPage, UNO_QUERY );
             if ( xPageControl.is() )
diff --git a/cui/source/options/webconninfo.cxx 
b/cui/source/options/webconninfo.cxx
index 3798fc77eb9e..641367713225 100644
--- a/cui/source/options/webconninfo.cxx
+++ b/cui/source/options/webconninfo.cxx
@@ -85,9 +85,8 @@ void WebConnectionInfoDialog::FillPasswordList()
 
         if ( xMasterPasswd->isPersistentStoringAllowed() )
         {
-            uno::Reference< task::XInteractionHandler > xInteractionHandler(
-                
task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(),
 nullptr),
-                uno::UNO_QUERY);
+            uno::Reference< task::XInteractionHandler > xInteractionHandler =
+                
task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(),
 nullptr);
 
             uno::Sequence< task::UrlRecord > aURLEntries = 
xMasterPasswd->getAllPersistent( xInteractionHandler );
             sal_Int32 nCount = 0;
@@ -185,9 +184,8 @@ IMPL_LINK_NOARG(WebConnectionInfoDialog, ChangePasswordHdl, 
weld::Button&, void)
                   = new ::comphelper::SimplePasswordRequest;
             uno::Reference< task::XInteractionRequest > rRequest( 
pPasswordRequest );
 
-            uno::Reference< task::XInteractionHandler > xInteractionHandler(
-                
task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(),
 m_xDialog->GetXWindow()),
-                uno::UNO_QUERY );
+            uno::Reference< task::XInteractionHandler > xInteractionHandler =
+                
task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(),
 m_xDialog->GetXWindow());
             xInteractionHandler->handle( rRequest );
 
             if ( pPasswordRequest->isPassword() )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to