diff options
author | Hannah Meeks <hmeeks4135@gmail.com> | 2022-07-15 18:55:41 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2022-07-20 14:46:37 +0200 |
commit | 4a49644c97c0f2c3e14a931592f28044a8596425 (patch) | |
tree | e1df1cf033d5dc312a163cb69e9b518602488e85 | |
parent | 4d945a41bc15412b20490535ac322b01953b64b6 (diff) |
VBA: Add Select Method to ActiveDocument
Change-Id: I0d8d02c555fd113b96661085b339b12d83c6010f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137109
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r-- | oovbaapi/ooo/vba/word/XDocument.idl | 1 | ||||
-rw-r--r-- | sw/source/ui/vba/vbadocument.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/vba/vbadocument.hxx | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/oovbaapi/ooo/vba/word/XDocument.idl b/oovbaapi/ooo/vba/word/XDocument.idl index d9717a7eea0c..0f7b5f994aa1 100644 --- a/oovbaapi/ooo/vba/word/XDocument.idl +++ b/oovbaapi/ooo/vba/word/XDocument.idl @@ -43,6 +43,7 @@ interface XDocument any Tables( [in] any Index ); any Fields( [in] any Index ); any Shapes( [in] any Index ); + void Select(); any Sections( [in] any Index ); void Activate(); any PageSetup(); diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx index 92251ef36da2..4a1a8dd8a2ae 100644 --- a/sw/source/ui/vba/vbadocument.cxx +++ b/sw/source/ui/vba/vbadocument.cxx @@ -255,6 +255,14 @@ SwVbaDocument::Shapes( const uno::Any& index ) return uno::Any( xCol ); } +void SAL_CALL +SwVbaDocument::Select() +{ + auto xRange = getContent(); + if ( xRange ) + xRange->Select(); +} + uno::Any SAL_CALL SwVbaDocument::Sections( const uno::Any& index ) { diff --git a/sw/source/ui/vba/vbadocument.hxx b/sw/source/ui/vba/vbadocument.hxx index 0d213690a982..f1352e44f625 100644 --- a/sw/source/ui/vba/vbadocument.hxx +++ b/sw/source/ui/vba/vbadocument.hxx @@ -63,6 +63,7 @@ public: virtual css::uno::Any SAL_CALL Tables( const css::uno::Any& aIndex ) override; virtual css::uno::Any SAL_CALL Fields( const css::uno::Any& aIndex ) override; virtual css::uno::Any SAL_CALL Shapes( const css::uno::Any& aIndex ) override; + virtual void SAL_CALL Select() override; virtual css::uno::Any SAL_CALL Sections( const css::uno::Any& aIndex ) override; virtual void SAL_CALL Activate() override; virtual css::uno::Any SAL_CALL PageSetup() override; |