[Libreoffice-commits] core.git: 2 commits - basic/source sc/uiconfig

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 29 08:19:35 UTC 2019


 basic/source/classes/sbxmod.cxx                 |   48 ++++++++++++------------
 sc/uiconfig/scalc/ui/conditionalformatdialog.ui |    4 +-
 2 files changed, 27 insertions(+), 25 deletions(-)

New commits:
commit 8aa327ab3e55b2978da31764afcfbdc545ffc0b0
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Oct 28 19:27:27 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Oct 29 09:18:32 2019 +0100

    Resolves: tdf#128410 wrong size request for dialog
    
    Change-Id: I880b00680723c7f8bac52dedc9aa7a1a6ba49e52
    Reviewed-on: https://gerrit.libreoffice.org/81627
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/uiconfig/scalc/ui/conditionalformatdialog.ui b/sc/uiconfig/scalc/ui/conditionalformatdialog.ui
index 39fec30c59e6..916cb7fe6ace 100644
--- a/sc/uiconfig/scalc/ui/conditionalformatdialog.ui
+++ b/sc/uiconfig/scalc/ui/conditionalformatdialog.ui
@@ -3,11 +3,11 @@
 <interface domain="sc">
   <requires lib="gtk+" version="3.18"/>
   <object class="GtkDialog" id="ConditionalFormatDialog">
-    <property name="width_request">0</property>
-    <property name="height_request">0</property>
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes" context="conditionalformatdialog|ConditionalFormatDialog">Conditional Formatting for</property>
+    <property name="default_width">0</property>
+    <property name="default_height">0</property>
     <property name="type_hint">dialog</property>
     <child>
       <placeholder/>
commit 10c9fe853aa97087185c33fb838de4b5b38d6d0a
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Oct 28 19:35:42 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Oct 29 09:18:00 2019 +0100

    Related: cid#1448329 call GetSbData() just once
    
    rather than every time its result it needed to deconvolute this a
    layer
    
    Change-Id: I1a611ed2bd74e682501cf8cbd64a5e285ec1c7e9
    Reviewed-on: https://gerrit.libreoffice.org/81628
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 0e93da321ccd..0015aeadc098 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1001,7 +1001,9 @@ void SbModule::Run( SbMethod* pMeth )
 
     static sal_uInt16 nMaxCallLevel = 0;
 
-    bool bDelInst = ( GetSbData()->pInst == nullptr );
+    SbiGlobals* pSbData = GetSbData();
+
+    bool bDelInst = pSbData->pInst == nullptr;
     bool bQuit = false;
     StarBASICRef xBasic;
     uno::Reference< frame::XModel > xModel;
@@ -1011,7 +1013,7 @@ void SbModule::Run( SbMethod* pMeth )
         // #32779: Hold Basic during the execution
         xBasic = static_cast<StarBASIC*>( GetParent() );
 
-        GetSbData()->pInst = new SbiInstance( static_cast<StarBASIC*>(GetParent()) );
+        pSbData->pInst = new SbiInstance( static_cast<StarBASIC*>(GetParent()) );
 
         /*  If a VBA script in a document is started, get the VBA compatibility
             interface from the document Basic library container, and notify all
@@ -1048,7 +1050,7 @@ void SbModule::Run( SbMethod* pMeth )
                 if( pAppSymbol )
                 {
                     pMSOMacroRuntimeLib->SetFlag( SbxFlagBits::ExtSearch );      // Could have been disabled before
-                    GetSbData()->pMSOMacroRuntimLib = pMSOMacroRuntimeLib;
+                    pSbData->pMSOMacroRuntimLib = pMSOMacroRuntimeLib;
                 }
             }
         }
@@ -1076,13 +1078,13 @@ void SbModule::Run( SbMethod* pMeth )
     }
 
     // Recursion to deep?
-    if( ++GetSbData()->pInst->nCallLvl <= nMaxCallLevel )
+    if( ++pSbData->pInst->nCallLvl <= nMaxCallLevel )
     {
         // Define a globale variable in all Mods
         GlobalRunInit( /* bBasicStart = */ bDelInst );
 
         // Appeared a compiler error? Then we don't launch
-        if( !GetSbData()->bGlobalInitErr )
+        if( !pSbData->bGlobalInitErr )
         {
             if( bDelInst )
             {
@@ -1091,20 +1093,20 @@ void SbModule::Run( SbMethod* pMeth )
                 // 1996-10-16: #31460 New concept for StepInto/Over/Out
                 // For an explanation see runtime.cxx at SbiInstance::CalcBreakCallLevel()
                 // Identify the BreakCallLevel
-                GetSbData()->pInst->CalcBreakCallLevel( pMeth->GetDebugFlags() );
+                pSbData->pInst->CalcBreakCallLevel( pMeth->GetDebugFlags() );
             }
 
-            SbModule* pOldMod = GetSbData()->pMod;
-            GetSbData()->pMod = this;
+            SbModule* pOldMod = pSbData->pMod;
+            pSbData->pMod = this;
             std::unique_ptr<SbiRuntime> pRt(new SbiRuntime( this, pMeth, pMeth->nStart ));
 
-            pRt->pNext = GetSbData()->pInst->pRun;
+            pRt->pNext = pSbData->pInst->pRun;
             if( pRt->pNext )
                 pRt->pNext->block();
-            GetSbData()->pInst->pRun = pRt.get();
+            pSbData->pInst->pRun = pRt.get();
             if ( mbVBACompat )
             {
-                GetSbData()->pInst->EnableCompatibility( true );
+                pSbData->pInst->EnableCompatibility( true );
             }
 
             while( pRt->Step() ) {}
@@ -1122,12 +1124,12 @@ void SbModule::Run( SbMethod* pMeth )
             if( bDelInst )
             {
                 // Compare here with 1 instead of 0, because before nCallLvl--
-                while( GetSbData()->pInst->nCallLvl != 1 )
+                while (pSbData->pInst->nCallLvl != 1)
                     Application::Yield();
             }
 
-            GetSbData()->pInst->pRun = pRt->pNext;
-            GetSbData()->pInst->nCallLvl--;          // Call-Level down again
+            pSbData->pInst->pRun = pRt->pNext;
+            pSbData->pInst->nCallLvl--;          // Call-Level down again
 
             // Exist an higher-ranking runtime instance?
             // Then take over BasicDebugFlags::Break, if set
@@ -1136,7 +1138,7 @@ void SbModule::Run( SbMethod* pMeth )
                 pRtNext->SetDebugFlags( BasicDebugFlags::Break );
 
             pRt.reset();
-            GetSbData()->pMod = pOldMod;
+            pSbData->pMod = pOldMod;
             if( bDelInst )
             {
                 // #57841 Clear Uno-Objects, which were helt in RTL functions,
@@ -1145,9 +1147,9 @@ void SbModule::Run( SbMethod* pMeth )
 
                 clearNativeObjectWrapperVector();
 
-                SAL_WARN_IF(GetSbData()->pInst->nCallLvl != 0,"basic","BASIC-Call-Level > 0");
-                delete GetSbData()->pInst;
-                GetSbData()->pInst = nullptr;
+                SAL_WARN_IF(pSbData->pInst->nCallLvl != 0,"basic","BASIC-Call-Level > 0");
+                delete pSbData->pInst;
+                pSbData->pInst = nullptr;
                 bDelInst = false;
 
                 // #i30690
@@ -1173,11 +1175,11 @@ void SbModule::Run( SbMethod* pMeth )
             }
         }
         else
-               GetSbData()->pInst->nCallLvl--;           // Call-Level down again
+            pSbData->pInst->nCallLvl--;           // Call-Level down again
     }
     else
     {
-        GetSbData()->pInst->nCallLvl--;          // Call-Level down again
+        pSbData->pInst->nCallLvl--;          // Call-Level down again
         StarBASIC::FatalError( ERRCODE_BASIC_STACK_OVERFLOW );
     }
 
@@ -1188,10 +1190,10 @@ void SbModule::Run( SbMethod* pMeth )
        // the end of the program, so that nothing were helt.
         ClearUnoObjectsInRTL_Impl( xBasic.get() );
 
-        delete GetSbData()->pInst;
-        GetSbData()->pInst = nullptr;
+        delete pSbData->pInst;
+        pSbData->pInst = nullptr;
     }
-    if ( pBasic && pBasic->IsDocBasic() && pBasic->IsQuitApplication() && !GetSbData()->pInst )
+    if ( pBasic && pBasic->IsDocBasic() && pBasic->IsQuitApplication() && !pSbData->pInst )
             bQuit = true;
     if ( bQuit )
     {


More information about the Libreoffice-commits mailing list