[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - 2 commits - cui/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Nov 27 09:01:27 UTC 2019


 cui/source/customize/SvxNotebookbarConfigPage.cxx |    6 ++++++
 cui/source/customize/cfg.cxx                      |   21 ++++++++++-----------
 cui/source/inc/cfg.hxx                            |    1 +
 3 files changed, 17 insertions(+), 11 deletions(-)

New commits:
commit de5db9314c62859b06dd2bb7bd204d5db4821cf1
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Nov 25 12:23:10 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Nov 27 10:00:11 2019 +0100

    tdf#126043 freeze/thaw around bulk insert
    
    Change-Id: I2dd9aedc305a4fe1992fe8c52fee85ade8589a5b
    Reviewed-on: https://gerrit.libreoffice.org/83674
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 300ffc649aaa555bba19a0475d74067c9574fc04)
    Reviewed-on: https://gerrit.libreoffice.org/83833

diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx
index 4a26650b80e2..db450f5e78c4 100644
--- a/cui/source/customize/SvxNotebookbarConfigPage.cxx
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -475,6 +475,9 @@ void SvxNotebookbarConfigPage::SelectElement()
     aEntries = aTempEntries;
     aTempEntries.clear();
 
+    weld::TreeView& rTreeView = m_xContentsListBox->get_widget();
+    rTreeView.freeze();
+
     sal_Int64 nId = 0;
     for (std::size_t nIdx = 0; nIdx < aEntries.size(); nIdx++)
     {
@@ -495,6 +498,9 @@ void SvxNotebookbarConfigPage::SelectElement()
                                         aEntries[nIdx].sActionName, nIdx, 1);
         ++nId;
     }
+
+    rTreeView.thaw();
+
     aEntries.clear();
 }
 
commit e84acb8c5829775cb9d5d1115bbcb1b61bd260ee
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Nov 25 12:15:58 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Nov 27 09:59:27 2019 +0100

    tdf#126043 identify the frame module just once
    
    Change-Id: I7f68cf67838bb08672975e7a38cf213022e39ed8
    Reviewed-on: https://gerrit.libreoffice.org/83672
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 6e6233a5d0940e5bbdb346142091b0ae2e54e640)
    Reviewed-on: https://gerrit.libreoffice.org/83832

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 277ce523867a..1cb922bc51c6 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1040,12 +1040,12 @@ void SvxConfigPage::Reset( const SfxItemSet* )
             ::comphelper::getProcessComponentContext(), uno::UNO_SET_THROW );
 
         m_xFrame = GetFrame();
-        OUString aModuleId = GetFrameWithDefaultAndIdentify( m_xFrame );
+        m_aModuleId = GetFrameWithDefaultAndIdentify( m_xFrame );
 
         // replace %MODULENAME in the label with the correct module name
         uno::Reference< css::frame::XModuleManager2 > xModuleManager(
             css::frame::ModuleManager::create( xContext ));
-        OUString aModuleName = SvxConfigPageHelper::GetUIModuleName( aModuleId, xModuleManager );
+        OUString aModuleName = SvxConfigPageHelper::GetUIModuleName( m_aModuleId, xModuleManager );
 
         uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier >
             xModuleCfgSupplier( css::ui::theModuleUIConfigurationManagerSupplier::get(xContext) );
@@ -1056,11 +1056,11 @@ void SvxConfigPage::Reset( const SfxItemSet* )
         try
         {
             xCfgMgr =
-                xModuleCfgSupplier->getUIConfigurationManager( aModuleId );
+                xModuleCfgSupplier->getUIConfigurationManager( m_aModuleId );
 
             pModuleData = CreateSaveInData( xCfgMgr,
                                             uno::Reference< css::ui::XUIConfigurationManager >(),
-                                            aModuleId,
+                                            m_aModuleId,
                                             false );
         }
         catch ( container::NoSuchElementException& )
@@ -1077,7 +1077,7 @@ void SvxConfigPage::Reset( const SfxItemSet* )
         OUString aTitle;
         uno::Reference< frame::XController > xController =
             m_xFrame->getController();
-        if ( CanConfig( aModuleId ) && xController.is() )
+        if ( CanConfig( m_aModuleId ) && xController.is() )
         {
             uno::Reference< frame::XModel > xModel( xController->getModel() );
             if ( xModel.is() )
@@ -1096,7 +1096,7 @@ void SvxConfigPage::Reset( const SfxItemSet* )
         SaveInData* pDocData = nullptr;
         if ( xDocCfgMgr.is() )
         {
-            pDocData = CreateSaveInData( xDocCfgMgr, xCfgMgr, aModuleId, true );
+            pDocData = CreateSaveInData( xDocCfgMgr, xCfgMgr, m_aModuleId, true );
 
             if ( !pDocData->IsReadOnly() )
             {
@@ -1144,7 +1144,7 @@ void SvxConfigPage::Reset( const SfxItemSet* )
         DBG_ASSERT( pCurrentSaveInData, "SvxConfigPage::Reset(): no SaveInData" );
 #endif
 
-        if ( CanConfig( aModuleId ) )
+        if ( CanConfig( m_aModuleId ) )
         {
             // Load configuration for other open documents which have
             // same module type
@@ -1178,7 +1178,7 @@ void SvxConfigPage::Reset( const SfxItemSet* )
                     } catch(const uno::Exception&)
                         { aCheckId.clear(); }
 
-                    if ( aModuleId == aCheckId )
+                    if ( m_aModuleId == aCheckId )
                     {
                         // try to get the document based ui configuration manager
                         OUString aTitle2;
@@ -1207,7 +1207,7 @@ void SvxConfigPage::Reset( const SfxItemSet* )
 
                         if ( xDocCfgMgr.is() )
                         {
-                            SaveInData* pData = CreateSaveInData( xDocCfgMgr, xCfgMgr, aModuleId, true );
+                            SaveInData* pData = CreateSaveInData( xDocCfgMgr, xCfgMgr, m_aModuleId, true );
 
                             if ( pData && !pData->IsReadOnly() )
                             {
@@ -1406,9 +1406,8 @@ int SvxConfigPage::AddFunction(int nTarget, bool bAllowDuplicates)
     }
 
     OUString aDisplayName;
-    OUString aModuleId = vcl::CommandInfoProvider::GetModuleIdentifier( m_xFrame );
 
-    auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(aURL, aModuleId);
+    auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(aURL, m_aModuleId);
 
     if ( typeid(*pCurrentSaveInData) == typeid(ContextMenuSaveInData) )
         aDisplayName = vcl::CommandInfoProvider::GetPopupLabelForCommand(aProperties);
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 0cd522354124..80b0e29d009b 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -381,6 +381,7 @@ protected:
     OUString                                   m_aURLToSelect;
 
     css::uno::Reference< css::frame::XFrame >  m_xFrame;
+    OUString                                   m_aModuleId;
 
     // Left side of the dialog where command categories and the available
     // commands in them are displayed as a searchable list


More information about the Libreoffice-commits mailing list