]> source.dussan.org Git - poi.git/commitdiff
bug 52949: add Word, Powerpoint, and Visio (HDGF) files with macros to test macro...
authorJaven O'Neal <onealj@apache.org>
Mon, 11 Apr 2016 03:02:18 +0000 (03:02 +0000)
committerJaven O'Neal <onealj@apache.org>
Mon, 11 Apr 2016 03:02:18 +0000 (03:02 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1738502 13f79535-47bb-0310-9956-ffa450edef68

test-data/diagram/SimpleMacro.vba [new file with mode: 0644]
test-data/diagram/SimpleMacro.vsd [new file with mode: 0644]
test-data/document/SimpleMacro.doc [new file with mode: 0644]
test-data/document/SimpleMacro.docm [new file with mode: 0644]
test-data/document/SimpleMacro.vba [new file with mode: 0644]
test-data/slideshow/SimpleMacro.ppt [new file with mode: 0644]
test-data/slideshow/SimpleMacro.pptm [new file with mode: 0644]
test-data/slideshow/SimpleMacro.vba [new file with mode: 0644]

diff --git a/test-data/diagram/SimpleMacro.vba b/test-data/diagram/SimpleMacro.vba
new file mode 100644 (file)
index 0000000..7fcf1fd
--- /dev/null
@@ -0,0 +1,12 @@
+Sub TestMacro()\r
+'\r
+' TestMacro Macro\r
+' This is a test macro\r
+'\r
+\r
+'\r
+    With ActiveDocument.Pages(1).Shapes(1)\r
+        .Text = "This is a macro vector graphics drawing"\r
+    End With\r
+End Sub\r
+\r
diff --git a/test-data/diagram/SimpleMacro.vsd b/test-data/diagram/SimpleMacro.vsd
new file mode 100644 (file)
index 0000000..df3f427
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 (file)
index 0000000..a6311b3
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 (file)
index 0000000..123b815
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 (file)
index 0000000..684420c
--- /dev/null
@@ -0,0 +1,10 @@
+Sub TestMacro()\r
+'\r
+' TestMacro Macro\r
+' This is a test macro\r
+'\r
+\r
+'\r
+    ActiveDocument.Paragraphs(1).Range.Text = "This is a macro word processing document"\r
+End Sub\r
+\r
diff --git a/test-data/slideshow/SimpleMacro.ppt b/test-data/slideshow/SimpleMacro.ppt
new file mode 100644 (file)
index 0000000..228ebe9
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 (file)
index 0000000..d39de5c
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 (file)
index 0000000..2f26227
--- /dev/null
@@ -0,0 +1,14 @@
+Sub TestMacro()\r
+'\r
+' TestMacro Macro\r
+' This is a test macro\r
+'\r
+\r
+'\r
+    With ActivePresentation.Slides(1).Shapes(1)\r
+        .Title.TextFrame.TextRange.Text = "This is a macro slideshow"\r
+    End With\r
+    With ActivePresentation.Slides(1).Shapes(2)\r
+        .Title.TextFrame.TextRange.Text = "subtitle"\r
+    EndWith\r
+End Sub\r