From e3ad497b79b0135659c6b6d1c011e3fbabb91a14 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Mon, 11 Apr 2016 03:02:18 +0000 Subject: bug 52949: add Word, Powerpoint, and Visio (HDGF) files with macros to test macro extraction git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1738502 13f79535-47bb-0310-9956-ffa450edef68 --- test-data/diagram/SimpleMacro.vba | 12 ++++++++++++ test-data/diagram/SimpleMacro.vsd | Bin 0 -> 19456 bytes test-data/document/SimpleMacro.doc | Bin 0 -> 36864 bytes test-data/document/SimpleMacro.docm | Bin 0 -> 15517 bytes test-data/document/SimpleMacro.vba | 10 ++++++++++ test-data/slideshow/SimpleMacro.ppt | Bin 0 -> 104960 bytes test-data/slideshow/SimpleMacro.pptm | Bin 0 -> 41578 bytes test-data/slideshow/SimpleMacro.vba | 14 ++++++++++++++ 8 files changed, 36 insertions(+) create mode 100644 test-data/diagram/SimpleMacro.vba create mode 100644 test-data/diagram/SimpleMacro.vsd create mode 100644 test-data/document/SimpleMacro.doc create mode 100644 test-data/document/SimpleMacro.docm create mode 100644 test-data/document/SimpleMacro.vba create mode 100644 test-data/slideshow/SimpleMacro.ppt create mode 100644 test-data/slideshow/SimpleMacro.pptm create mode 100644 test-data/slideshow/SimpleMacro.vba diff --git a/test-data/diagram/SimpleMacro.vba b/test-data/diagram/SimpleMacro.vba new file mode 100644 index 0000000000..7fcf1fdb4f --- /dev/null +++ b/test-data/diagram/SimpleMacro.vba @@ -0,0 +1,12 @@ +Sub TestMacro() +' +' TestMacro Macro +' This is a test macro +' + +' + With ActiveDocument.Pages(1).Shapes(1) + .Text = "This is a macro vector graphics drawing" + End With +End Sub + diff --git a/test-data/diagram/SimpleMacro.vsd b/test-data/diagram/SimpleMacro.vsd new file mode 100644 index 0000000000..df3f427ae3 Binary files /dev/null and b/test-data/diagram/SimpleMacro.vsd differ diff --git a/test-data/document/SimpleMacro.doc b/test-data/document/SimpleMacro.doc new file mode 100644 index 0000000000..a6311b3c9d Binary files /dev/null and b/test-data/document/SimpleMacro.doc differ diff --git a/test-data/document/SimpleMacro.docm b/test-data/document/SimpleMacro.docm new file mode 100644 index 0000000000..123b8157f3 Binary files /dev/null and b/test-data/document/SimpleMacro.docm differ diff --git a/test-data/document/SimpleMacro.vba b/test-data/document/SimpleMacro.vba new file mode 100644 index 0000000000..684420c27e --- /dev/null +++ b/test-data/document/SimpleMacro.vba @@ -0,0 +1,10 @@ +Sub TestMacro() +' +' TestMacro Macro +' This is a test macro +' + +' + ActiveDocument.Paragraphs(1).Range.Text = "This is a macro word processing document" +End Sub + diff --git a/test-data/slideshow/SimpleMacro.ppt b/test-data/slideshow/SimpleMacro.ppt new file mode 100644 index 0000000000..228ebe968b Binary files /dev/null and b/test-data/slideshow/SimpleMacro.ppt differ diff --git a/test-data/slideshow/SimpleMacro.pptm b/test-data/slideshow/SimpleMacro.pptm new file mode 100644 index 0000000000..d39de5c801 Binary files /dev/null and b/test-data/slideshow/SimpleMacro.pptm differ diff --git a/test-data/slideshow/SimpleMacro.vba b/test-data/slideshow/SimpleMacro.vba new file mode 100644 index 0000000000..2f26227e18 --- /dev/null +++ b/test-data/slideshow/SimpleMacro.vba @@ -0,0 +1,14 @@ +Sub TestMacro() +' +' TestMacro Macro +' This is a test macro +' + +' + With ActivePresentation.Slides(1).Shapes(1) + .Title.TextFrame.TextRange.Text = "This is a macro slideshow" + End With + With ActivePresentation.Slides(1).Shapes(2) + .Title.TextFrame.TextRange.Text = "subtitle" + EndWith +End Sub -- cgit v1.2.3