[Libreoffice-commits] core.git: framework/source

Maxim Monastirsky momonasmon at gmail.com
Mon Oct 16 21:35:22 UTC 2017


 framework/source/uielement/addonstoolbarmanager.cxx |    1 +
 framework/source/uielement/toolbarmanager.cxx       |    5 +++++
 2 files changed, 6 insertions(+)

New commits:
commit 616f21db9e50a77b0c02dfb123f871a742f46216
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Mon Oct 9 19:56:04 2017 +0300

    tdf#79657 Support add-on controls in the overflow toolbar
    
    Change-Id: Idf76887a49561475587329c304329007034610a1
    Reviewed-on: https://gerrit.libreoffice.org/43436
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>

diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index 9d00ca60d939..7761fb20c4b8 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -266,6 +266,7 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue
                 AddonsParams* pRuntimeItemData = new AddonsParams;
                 pRuntimeItemData->aImageId  = aImageId;
                 pRuntimeItemData->aTarget   = aTarget;
+                pRuntimeItemData->aControlType = aControlType;
                 pRuntimeItemData->nWidth    = nWidth;
                 m_pToolBar->SetItemData( nId, pRuntimeItemData );
                 m_pToolBar->SetItemCommand( nId, aURL );
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index a4525a204264..59cc6c1873c8 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1193,6 +1193,11 @@ void ToolBarManager::FillOverflowToolbar( ToolBox const * pParent )
             m_pToolBar->SetItemCommand( nId, aCommandURL );
             m_pToolBar->SetQuickHelpText( nId, pParent->GetQuickHelpText( nId ) );
 
+            // Handle possible add-on controls.
+            AddonsParams* pAddonParams = static_cast< AddonsParams* >( pParent->GetItemData( nId ) );
+            if ( pAddonParams )
+                m_pToolBar->SetItemData( nId, new AddonsParams( *pAddonParams ) );
+
             // Fill command map. It stores all our commands and from what
             // image manager we got our image. So we can decide if we have to use an
             // image from a notification message.


More information about the Libreoffice-commits mailing list