summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--oovbaapi/ooo/vba/word/XApplication.idl10
-rw-r--r--sw/source/ui/vba/vbaapplication.cxx17
-rw-r--r--sw/source/ui/vba/vbaapplication.hxx2
3 files changed, 29 insertions, 0 deletions
diff --git a/oovbaapi/ooo/vba/word/XApplication.idl b/oovbaapi/ooo/vba/word/XApplication.idl
index 62319f63a932..d061586b8de1 100644
--- a/oovbaapi/ooo/vba/word/XApplication.idl
+++ b/oovbaapi/ooo/vba/word/XApplication.idl
@@ -40,6 +40,16 @@ interface XApplication : XConnectable
[attribute] long Height;
[attribute] long Left;
[attribute] long Top;
+ // Setting this displays the string in a SAL_INFO message with tag
+ // extensions.olebridge. Provides a way to get a message from an
+ // Automation client into LibreOffice's debug output. Less
+ // disruptive than a MessageBox() in a VB6 client, for instance.
+ // And makes it possible to get merged debug output from both the client
+ // and LibreOffice in proper synchronized order.
+ //
+ // Actually write-only but there is no way to say that in UNO IDL.
+ // The getter just returns an empty string.
+ [attribute] string StatusBar;
any CommandBars( [in] any Index );
any Documents( [in] any Index );
diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx
index 37358d2cc51d..3fcfc12f3a1e 100644
--- a/sw/source/ui/vba/vbaapplication.cxx
+++ b/sw/source/ui/vba/vbaapplication.cxx
@@ -288,6 +288,23 @@ void SAL_CALL SwVbaApplication::setTop( sal_Int32 _top )
pWindow->setTop( _top );
}
+OUString SAL_CALL SwVbaApplication::getStatusBar()
+{
+ return OUString("");
+}
+
+void SAL_CALL SwVbaApplication::setStatusBar( const OUString& _statusbar )
+{
+ // 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
+ // output (in extensions/source/ole) uses that tag. If the check for "cross-module" or mixed log
+ // areas in compilerplugins/clang/sallogareas.cxx is re-activated, this will have to be added as
+ // a special case.
+
+ SAL_INFO("extensions.olebridge", "Client debug output: " << _statusbar);
+}
+
float SAL_CALL SwVbaApplication::CentimetersToPoints( float Centimeters )
{
return VbaApplicationBase::CentimetersToPoints( Centimeters );
diff --git a/sw/source/ui/vba/vbaapplication.hxx b/sw/source/ui/vba/vbaapplication.hxx
index 9cf2da2a5dd8..c7e73dd6da26 100644
--- a/sw/source/ui/vba/vbaapplication.hxx
+++ b/sw/source/ui/vba/vbaapplication.hxx
@@ -85,6 +85,8 @@ public:
virtual void SAL_CALL setLeft( sal_Int32 _left ) override;
virtual sal_Int32 SAL_CALL getTop() override;
virtual void SAL_CALL setTop( sal_Int32 _top ) override;
+ virtual OUString SAL_CALL getStatusBar() override;
+ virtual void SAL_CALL setStatusBar( const OUString& _statusbar ) override;
virtual float SAL_CALL CentimetersToPoints( float Centimeters ) override;
virtual void SAL_CALL ShowMe() override;
virtual void SAL_CALL Resize( sal_Int32 Width, sal_Int32 Height ) override;