[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - basctl/source

Jan-Marek Glogowski glogow at fbihome.de
Mon Oct 16 20:14:58 UTC 2017


 basctl/source/basicide/baside2b.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 91ec020991a0558ea4b927808f3b346254e52c3d
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Wed Oct 11 19:45:11 2017 +0200

    tdf#113052 needs mpUIBuilder to load breaklistmenu
    
    The mpUIBuilder object is also used in the else branch,
    so move the creation in the outer scope.
    
    Change-Id: I18211bbe3c6f85cdd7697225159a98ad672a4ce2
    (cherry picked from commit 7f7ed0260ab7e08401f0129cde312cd8aa0fbddf)
    Reviewed-on: https://gerrit.libreoffice.org/43330
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 3a9d1d4bc405..42fa77f9ce78 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1451,14 +1451,14 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt )
 {
     if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
     {
+        if (!mpUIBuilder)
+            mpUIBuilder.reset(new VclBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/BasicIDE/ui/breakpointmenus.ui", ""));
+
         Point aPos( rCEvt.IsMouseEvent() ? rCEvt.GetMousePosPixel() : Point(1,1) );
         Point aEventPos( PixelToLogic( aPos ) );
         BreakPoint* pBrk = rCEvt.IsMouseEvent() ? FindBreakPoint( aEventPos ) : nullptr;
         if ( pBrk )
         {
-            if (!mpUIBuilder)
-                mpUIBuilder.reset(new VclBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/BasicIDE/ui/breakpointmenus.ui", ""));
-
             // test if break point is enabled...
             VclPtr<PopupMenu> xBrkPropMenu = mpUIBuilder->get_menu("breakmenu");
             xBrkPropMenu->CheckItem(xBrkPropMenu->GetItemId("active"), pBrk->bEnabled);


More information about the Libreoffice-commits mailing list