oovbaapi/ooo/vba/word/XDocument.idl | 1 + sw/source/ui/vba/vbadocument.cxx | 8 ++++++++ sw/source/ui/vba/vbadocument.hxx | 1 + 3 files changed, 10 insertions(+)
New commits: commit 4a49644c97c0f2c3e14a931592f28044a8596425 Author: Hannah Meeks <hmeeks4...@gmail.com> AuthorDate: Fri Jul 15 18:55:41 2022 +0100 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Wed Jul 20 14:46:37 2022 +0200 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 <qui...@gmail.com> 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;