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

Muhammet Kara muhammet.kara at pardus.org.tr
Thu Sep 7 09:25:15 UTC 2017


 cui/source/customize/cfg.cxx |   14 +++-----------
 cui/source/inc/cfg.hxx       |    1 -
 2 files changed, 3 insertions(+), 12 deletions(-)

New commits:
commit b9c55dcd7485ab36f0187abf5265321ba832d117
Author: Muhammet Kara <muhammet.kara at pardus.org.tr>
Date:   Fri Aug 25 15:57:30 2017 +0300

    Don't use PostUserEvent to show message box in Customize dialog
    
    Otherwise, it causes (I think) some clean-up issues, and causes
    the menu bar not to be refreshed on delete of a custom menu after
    trying to add an already existing command to the custom menu,
    and getting the warning message box. And clicking the non-existent
    menu causes the whole application to crash because of the dangling
    reference, I think. The exact error message on crash was an "out of
    range" error of a vector."
    
    And we don't need the D&D stuff any more. (At least for now.)
    
    Change-Id: I74b8b414e28349065b7408e21e07245fc40f2c75
    Reviewed-on: https://gerrit.libreoffice.org/41930
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index f7c6d6ce0774..195517218184 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1658,9 +1658,9 @@ SvTreeListEntry* SvxConfigPage::AddFunction(
 
             if ( pCurEntry->GetCommand() == pNewEntryData->GetCommand() )
             {
-                // asynchronous error message, because of MsgBoxes
-                PostUserEvent(
-                    LINK( this, SvxConfigPage, AsyncInfoMsg ), nullptr, true );
+                ScopedVclPtrInstance<MessageDialog>(this,
+                    CuiResId( RID_SVXSTR_MNUCFG_ALREADY_INCLUDED ),
+                    VclMessageType::Info)->Execute();
                 delete pNewEntryData;
                 return nullptr;
             }
@@ -1771,14 +1771,6 @@ SvTreeListEntry* SvxConfigPage::InsertEntryIntoUI(
     return pNewEntry;
 }
 
-IMPL_LINK_NOARG( SvxConfigPage, AsyncInfoMsg, void*, void )
-{
-    // Asynchronous msg because of D&D
-    ScopedVclPtrInstance<MessageDialog>(this,
-        CuiResId( RID_SVXSTR_MNUCFG_ALREADY_INCLUDED ),
-        VclMessageType::Info)->Execute();
-}
-
 IMPL_LINK( SvxConfigPage, MoveHdl, Button *, pButton, void )
 {
     MoveEntry(pButton == m_pMoveUpButton);
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index dda5a5fe44bc..239860943a7b 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -380,7 +380,6 @@ private:
     SaveInData*                         pCurrentSaveInData;
 
     DECL_LINK(  SelectSaveInLocation, ListBox&, void );
-    DECL_LINK( AsyncInfoMsg, void*, void );
     DECL_LINK( SearchUpdateHdl, Edit&, void );
 
 protected:


More information about the Libreoffice-commits mailing list