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

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 20 11:11:55 UTC 2019


 oovbaapi/ooo/vba/excel/XApplication.idl |    1 +
 sc/source/ui/vba/vbaapplication.cxx     |    9 +++++++++
 sc/source/ui/vba/vbaapplication.hxx     |    1 +
 3 files changed, 11 insertions(+)

New commits:
commit de96253fd8b98d5b6b63e0f777d2569fe9bdf625
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Apr 1 22:09:21 2019 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Sep 20 13:11:05 2019 +0200

    Add Rows() method to ooo.vba.excel.XApplication
    
    Change-Id: I7e1d83539153eede300b2b24f2fa6796859d299c
    (cherry picked from commit 948578cadd2acda5b1b0e43138c5155c9dc6a05a)
    Reviewed-on: https://gerrit.libreoffice.org/79198
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/oovbaapi/ooo/vba/excel/XApplication.idl b/oovbaapi/ooo/vba/excel/XApplication.idl
index ceceaf777d97..89a19197116f 100644
--- a/oovbaapi/ooo/vba/excel/XApplication.idl
+++ b/oovbaapi/ooo/vba/excel/XApplication.idl
@@ -87,6 +87,7 @@ interface XApplication
     void Volatile([in] any Volatile);
     any Caller( [in] any Index );
     any MenuBars( [in] any aIndex );
+    any Rows( [in] any aIndex );
     void Undo();
 };
 
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 9102d50afef7..f815d93e3a58 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1374,6 +1374,15 @@ ScVbaApplication::MenuBars( const uno::Any& aIndex )
     return uno::Any( xMenuBars );
 }
 
+uno::Any SAL_CALL
+ScVbaApplication::Rows( const uno::Any& aIndex )
+{
+    uno::Reference< excel::XWorksheet > xWorksheet( getActiveSheet(), uno::UNO_QUERY );
+    if ( xWorksheet.is() )
+        return uno::Any( xWorksheet->Rows( aIndex ) );
+    return uno::Any();
+}
+
 void SAL_CALL ScVbaApplication::OnKey( const OUString& Key, const uno::Any& Procedure )
 {
     try
diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx
index 6c9c58588ada..2fa7e005e400 100644
--- a/sc/source/ui/vba/vbaapplication.hxx
+++ b/sc/source/ui/vba/vbaapplication.hxx
@@ -143,6 +143,7 @@ public:
     virtual double SAL_CALL InchesToPoints( double InchesToPoints ) override;
     virtual void SAL_CALL Volatile( const css::uno::Any& Volatile ) override;
     virtual css::uno::Any SAL_CALL MenuBars( const css::uno::Any& aIndex ) override;
+    virtual css::uno::Any SAL_CALL Rows( const css::uno::Any& aIndex ) override;
     virtual css::uno::Any SAL_CALL Caller( const css::uno::Any& aIndex ) override;
     virtual void SAL_CALL Undo() override;
 


More information about the Libreoffice-commits mailing list