[Libreoffice-commits] core.git: 2 commits - cui/source sw/source

Maxim Monastirsky momonasmon at gmail.com
Thu Jan 21 12:35:59 PST 2016


 cui/source/customize/cfg.cxx        |    9 ++++++++-
 sw/source/uibase/shells/annotsh.cxx |    4 ++--
 2 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit eb3ee586e420ee4e38f9ef8c579e1a37d2dc0c10
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Thu Jan 21 22:27:55 2016 +0200

    tdf#87178 Resetting menu shouldn't reset other resources
    
    Change-Id: I6d6334cac9fdb5dfa3e35fe0cba70e5d9adf6fc2

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index cd941be..e3d1f4d 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1325,7 +1325,14 @@ void SaveInData::ApplyMenu(
 void
 MenuSaveInData::Reset()
 {
-    GetConfigManager()->reset();
+    try
+    {
+        GetConfigManager()->removeSettings( m_aMenuResourceURL );
+    }
+    catch ( const css::uno::Exception& )
+    {}
+
+    PersistChanges( GetConfigManager() );
 
     delete pRootEntry;
     pRootEntry = nullptr;
commit 9d74942d097044abbecfb9db1d515157c609289f
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Thu Jan 21 21:51:29 2016 +0200

    Check for valid SidebarWin
    
    Change-Id: Ia483408b5fef0880d44f37b6372054956f0ab069

diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 9867c8a..f19da7e 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -1118,7 +1118,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
             const SfxStringItem* pItem = rReq.GetArg<SfxStringItem>(nSlot);
             if ( pItem )
                 pPostItMgr->Delete( pItem->GetValue() );
-            else
+            else if ( pPostItMgr->HasActiveSidebarWin() )
                 pPostItMgr->Delete( pPostItMgr->GetActiveSidebarWin()->GetAuthor() );
             break;
         }
@@ -1132,7 +1132,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
             const SfxStringItem* pItem = rReq.GetArg<SfxStringItem>(nSlot);
             if ( pItem )
                 pPostItMgr->Hide( pItem->GetValue() );
-            else
+            else if ( pPostItMgr->HasActiveSidebarWin() )
                 pPostItMgr->Hide( pPostItMgr->GetActiveSidebarWin()->GetAuthor() );
         }
     }


More information about the Libreoffice-commits mailing list