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

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 20 09:17:34 UTC 2019


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

New commits:
commit 0b059abfaa27c55af789e13d73f7046f752c4636
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Feb 13 14:41:46 2019 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Sep 20 11:16:38 2019 +0200

    Interpret the parameter of WordBasic.FileClose() more correctly
    
    In particular, the value 2 means "do not save".
    
    Change-Id: I9788d201f8ecfcc016a12aa2088552ee994e1c17
    (cherry picked from commit fb797eb41bf9b26261c4d9fe7a38ba635b80a20c)
    Reviewed-on: https://gerrit.libreoffice.org/79164
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx
index 133a83b0ce1b..033b2cdb4432 100644
--- a/sw/source/ui/vba/vbaapplication.cxx
+++ b/sw/source/ui/vba/vbaapplication.cxx
@@ -557,8 +557,8 @@ SwWordBasic::FileClose( const css::uno::Any& Save )
 {
     uno::Reference< frame::XModel > xModel( mpApp->getCurrentDocument(), uno::UNO_SET_THROW );
 
-    bool bSave = false;
-    if (Save.hasValue() && (Save >>= bSave) && bSave)
+    sal_Int16 nSave = false;
+    if (Save.hasValue() && (Save >>= nSave) && (nSave == 0 || nSave == 1))
         FileSave();
 
     // FIXME: Here I would much prefer to call VbaDocumentBase::Close() but not sure how to get at
commit 3a58f51767b409a9807aed582e5c00fbac43d6de
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Feb 7 12:04:49 2019 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Sep 20 11:16:09 2019 +0200

    The WindowName param to WordBasic.AppMaximize() is optional and must be an Any
    
    Change-Id: I52d75427fe30945293f347e3f49d21bc2016edae
    (cherry picked from commit 699676cec58083afd7fa60b67e32cf7d6c9cf63f)
    Reviewed-on: https://gerrit.libreoffice.org/79163
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/oovbaapi/ooo/vba/word/XWordBasic.idl b/oovbaapi/ooo/vba/word/XWordBasic.idl
index 17cf27742b2f..908c963d6978 100644
--- a/oovbaapi/ooo/vba/word/XWordBasic.idl
+++ b/oovbaapi/ooo/vba/word/XWordBasic.idl
@@ -39,7 +39,7 @@ interface XWordBasic
                                   [in] any OpenExclusive,
                                   [in] any SubType );
 
-    long AppMaximize( [in] string WindowName, [in] any State );
+    long AppMaximize( [in] any WindowName, [in] any State );
     long DocMaximize( [in] any State );
     void AppShow( [in] any WindowName );
     long AppCount();
diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx
index aefe022f41a1..133a83b0ce1b 100644
--- a/sw/source/ui/vba/vbaapplication.cxx
+++ b/sw/source/ui/vba/vbaapplication.cxx
@@ -109,7 +109,7 @@ public:
                                                   const css::uno::Any& WritePasswordTemplate, const css::uno::Any& Connection,
                                                   const css::uno::Any& SQLStatement, const css::uno::Any& SQLStatement1,
                                                   const css::uno::Any& OpenExclusive, const css::uno::Any& SubType) override;
-    virtual sal_Int32 SAL_CALL AppMaximize( const OUString& WindowName, const css::uno::Any& State ) override;
+    virtual sal_Int32 SAL_CALL AppMaximize( const css::uno::Any& WindowName, const css::uno::Any& State ) override;
     virtual sal_Int32 SAL_CALL DocMaximize( const css::uno::Any& State ) override;
     virtual void SAL_CALL AppShow(  const css::uno::Any& WindowName ) override;
     virtual sal_Int32 SAL_CALL AppCount() override;
@@ -652,7 +652,7 @@ SwWordBasic::MailMergeOpenDataSource( const OUString& Name, const css::uno::Any&
 }
 
 sal_Int32 SAL_CALL
-SwWordBasic::AppMaximize( const OUString& WindowName, const css::uno::Any& State )
+SwWordBasic::AppMaximize( const css::uno::Any& WindowName, const css::uno::Any& State )
 {
     SAL_INFO("sw.vba", "WordBasic.AppMaximize( WindowName:=" << WindowName << ", State:=" << State);
 


More information about the Libreoffice-commits mailing list