[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 2 commits - vbahelper/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Mar 2 15:57:33 UTC 2019


 vbahelper/source/vbahelper/vbacommandbarhelper.cxx |    5 +++--
 vbahelper/source/vbahelper/vbacommandbars.cxx      |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 97b90ad9cf4fbcef9c225928d38a367152a7d3b6
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Mar 1 17:50:18 2019 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Sat Mar 2 17:56:47 2019 +0200

    Use sal_Int32 for the index as it comes in as a LONG at least from VBScript
    
    An Any containing a LONG with value 1 won't be put into a sal_Int16 by
    the >>= operator, even if it obviously would fit... But maybe
    consistency is good here.
    
    Change-Id: If39054148f72211eae3c897675708aab58f425b2

diff --git a/vbahelper/source/vbahelper/vbacommandbars.cxx b/vbahelper/source/vbahelper/vbacommandbars.cxx
index dfd0f2fa565e..d0afb059c479 100644
--- a/vbahelper/source/vbahelper/vbacommandbars.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbars.cxx
@@ -208,7 +208,7 @@ ScVbaCommandBars::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ )
     }
 
     // hardcode if "aIndex = 1" that would return "main menu".
-    sal_Int16 nIndex = 0;
+    sal_Int32 nIndex = 0;
     aIndex >>= nIndex;
     if( nIndex == 1 )
     {
commit 87b4bd61792b28fe475c71d4484cd219c1e533ae
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Mar 1 17:43:13 2019 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Sat Mar 2 17:56:47 2019 +0200

    Use comphelper::getProcessComponentContext()
    
    The context in the mxContext member does not seem to be usable for
    what we need it for here. Using what
    comphelper::getProcessComponentContext() returns works better. Let's
    hope it has no unintended side-effects.
    
    This likely makes the mxContext member unused, but I did not bother
    removing it yet, to keep this commit minimal.
    
    Change-Id: Ic048683b066af7952e2e84b03ea306e7daaba259

diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
index 777e7a3695b7..915805b81f88 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
@@ -111,12 +111,13 @@ void VbaCommandBarHelper::Init( )
         throw uno::RuntimeException( "Not implemented" );
     }
 
+    css::uno::Reference< css::uno::XComponentContext > xContext(comphelper::getProcessComponentContext());
     css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xUICfgMgrSupp(
-        css::ui::theModuleUIConfigurationManagerSupplier::get(mxContext) );
+        css::ui::theModuleUIConfigurationManagerSupplier::get( xContext ) );
 
     m_xAppCfgMgr.set( xUICfgMgrSupp->getUIConfigurationManager( maModuleId ), uno::UNO_QUERY_THROW );
 
-    css::uno::Reference< css::container::XNameAccess > xNameAccess = css::ui::theWindowStateConfiguration::get( mxContext );
+    css::uno::Reference< css::container::XNameAccess > xNameAccess = css::ui::theWindowStateConfiguration::get( xContext );
 
     m_xWindowState.set( xNameAccess->getByName( maModuleId ), uno::UNO_QUERY_THROW );
 }


More information about the Libreoffice-commits mailing list