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

Tor Lillqvist tml at collabora.com
Thu Jun 7 13:39:38 UTC 2018


 sw/source/ui/vba/vbaapplication.cxx |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

New commits:
commit fb1c8d78072852add82523c215da1ffe2822734b
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Jun 7 14:23:58 2018 +0300

    Show the "status bar" property in the LO status indicator also in Writer
    
    Note that the semantics of the ooo.vba.word.XApplication StatusBar
    property is much simpler than that in ooo.vba.excel.XApplication. The
    setter always takes a string, not alternatively a boolean.
    
    Change-Id: I5907ab4eb75f5cfb55b0eeda78e8bbf3854ea50f
    Reviewed-on: https://gerrit.libreoffice.org/55421
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx
index 3fcfc12f3a1e..f3bdd9968667 100644
--- a/sw/source/ui/vba/vbaapplication.cxx
+++ b/sw/source/ui/vba/vbaapplication.cxx
@@ -16,6 +16,10 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
+
+#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
+#include <com/sun/star/task/XStatusIndicator.hpp>
+
 #include "vbaapplication.hxx"
 #include "vbadocument.hxx"
 #include <osl/file.hxx>
@@ -295,6 +299,19 @@ OUString SAL_CALL SwVbaApplication::getStatusBar()
 
 void SAL_CALL SwVbaApplication::setStatusBar( const OUString& _statusbar )
 {
+    // ScVbaAppSettings::setStatusBar() also uses the XStatusIndicator to show this, so maybe that is OK?
+    uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY );
+    if (xModel.is())
+    {
+        uno::Reference< task::XStatusIndicatorSupplier > xStatusIndicatorSupplier( xModel->getCurrentController(), uno::UNO_QUERY );
+        if (xStatusIndicatorSupplier.is())
+        {
+            uno::Reference< task::XStatusIndicator > xStatusIndicator( xStatusIndicatorSupplier->getStatusIndicator(), uno::UNO_QUERY );
+            if (xStatusIndicator.is())
+                xStatusIndicator->start( _statusbar, 100 );
+        }
+    }
+
     // Yes, we intentionally use the "extensions.olebridge" tag here even if this is sw. We
     // interpret setting the StatusBar property as a request from an Automation client to display
     // the string in LibreOffice's debug output, and all other generic Automation support debug


More information about the Libreoffice-commits mailing list