[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - oovbaapi/ooo sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Jan 21 16:08:47 UTC 2019


 oovbaapi/ooo/vba/word/XWordBasic.idl |    9 ++++++++-
 sw/source/ui/vba/vbaapplication.cxx  |    8 ++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit f3b2383b2c8967ad57c8b9316395edcb297121ed
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Jan 21 18:08:12 2019 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Jan 21 18:08:12 2019 +0200

    Add a couple know parameters to WordBasic.ToolsOptionsView
    
    Change-Id: Ifd472f4ca79ab97a1d6d5c5007537375121f6f58

diff --git a/oovbaapi/ooo/vba/word/XWordBasic.idl b/oovbaapi/ooo/vba/word/XWordBasic.idl
index 320787361ca9..24f4853024c9 100644
--- a/oovbaapi/ooo/vba/word/XWordBasic.idl
+++ b/oovbaapi/ooo/vba/word/XWordBasic.idl
@@ -18,7 +18,14 @@ interface XWordBasic
 
     void FileOpen( [in] string Name, [in] any ConfirmConversions, [in] any ReadOnly, [in] any AddToMru, [in] any PasswordDoc, [in] any PasswordDot, [in] any Revert, [in] any WritePasswordDoc, [in] any WritePasswordDot );
     void FileSave();
-    void ToolsOptionsView( [in] any Whatever1, [in] any Whatever2, [in] any Whatever3, [in] any Whatever4, [in] any Whatever5, [in] any Whatever6, [in] any Whatever7, [in] any Whatever8, [in] any Whatever9, [in] any Whatever10, [in] any Whatever11, [in] any Whatever12, [in] any Whatever13, [in] any Whatever14, [in] any Whatever15, [in] any Whatever16, [in] any Whatever17, [in] any Whatever18, [in] any Whatever19, [in] any Whatever20 );
+    // There is no documentation for ToolsOptionsView, but all examples seem to pass it only named
+    // parameters, so the order of parameters in the definition doesn't matter, I hope. Define some
+    // (named) parameters found in sample code on the net. And ones found in customer code as
+    // necessary later.
+    //
+    // If it turns out that ToolsOptionsView is actually called with both named and positional parameters in customer code
+    // we might be in trouble.
+    void ToolsOptionsView( [in] any FieldCodes, [in] any ShowAll, [in] any Whatever3, [in] any Whatever4, [in] any Whatever5, [in] any Whatever6, [in] any Whatever7, [in] any Whatever8, [in] any Whatever9, [in] any Whatever10, [in] any Whatever11, [in] any Whatever12, [in] any Whatever13, [in] any Whatever14, [in] any Whatever15, [in] any Whatever16, [in] any Whatever17, [in] any Whatever18, [in] any Whatever19, [in] any Whatever20 );
     string WindowName();
     boolean ExistingBookmark( [in] string Name );
     void MailMergeOpenDataSource( [in] string Name,
diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx
index 073d22eedf07..a77daa6520be 100644
--- a/sw/source/ui/vba/vbaapplication.cxx
+++ b/sw/source/ui/vba/vbaapplication.cxx
@@ -76,8 +76,8 @@ public:
 
     virtual void SAL_CALL FileOpen( const OUString& Name, const uno::Any& ConfirmConversions, const uno::Any& ReadOnly, const uno::Any& AddToMru, const uno::Any& PasswordDoc, const uno::Any& PasswordDot, const uno::Any& Revert, const uno::Any& WritePasswordDoc, const uno::Any& WritePasswordDot ) override;
     virtual void SAL_CALL FileSave() override;
-    virtual void SAL_CALL ToolsOptionsView( const css::uno::Any& Whatever1,
-                                            const css::uno::Any& Whatever2,
+    virtual void SAL_CALL ToolsOptionsView( const css::uno::Any& FieldCodes,
+                                            const css::uno::Any& ShowAll,
                                             const css::uno::Any& Whatever3,
                                             const css::uno::Any& Whatever4,
                                             const css::uno::Any& Whatever5,
@@ -540,8 +540,8 @@ SwWordBasic::FileSave()
 }
 
 void SAL_CALL
-SwWordBasic::ToolsOptionsView( const css::uno::Any& /*Whatever1*/,
-                               const css::uno::Any& /*Whatever2*/,
+SwWordBasic::ToolsOptionsView( const css::uno::Any& /*FieldCodes*/,
+                               const css::uno::Any& /*ShowAll*/,
                                const css::uno::Any& /*Whatever3*/,
                                const css::uno::Any& /*Whatever4*/,
                                const css::uno::Any& /*Whatever5*/,


More information about the Libreoffice-commits mailing list