summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2019-04-01 22:09:21 +0300
committerTor Lillqvist <tml@collabora.com>2019-04-01 22:11:37 +0300
commitd4202e3ecd1f14cf4922e52c6e98046b190da386 (patch)
treebb359f97ccee61b3dbd3443d3f37ac079b64cbd9
parent9634f5ee73e57e8cef75461316d5d45b06ee104f (diff)
Add Rows() method to ooo.vba.excel.XApplication
Change-Id: I7e1d83539153eede300b2b24f2fa6796859d299c
-rw-r--r--oovbaapi/ooo/vba/excel/XApplication.idl1
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx9
-rw-r--r--sc/source/ui/vba/vbaapplication.hxx1
3 files changed, 11 insertions, 0 deletions
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 49ec1b48010a..77d94f0a7b8e 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1372,6 +1372,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 cf7e28f710fe..e0051ba3b966 100644
--- a/sc/source/ui/vba/vbaapplication.hxx
+++ b/sc/source/ui/vba/vbaapplication.hxx
@@ -142,6 +142,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;