summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-11-01 14:00:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-11-01 14:00:40 +0000
commita6e4a84197aa7a658e2ffb76c0326016dda76d8b (patch)
tree4410d3cea8bc5eedb01a9caec8585a8d905779f1
parentc2913591d895666c7b8019e3307355511a7a5f95 (diff)
add .odg regression load test
Change-Id: I5f7dc2a389c020a90b8087aefc90c054a809ef25
-rw-r--r--sd/CppunitTest_sd_filters_test.mk1
-rw-r--r--sd/qa/unit/data/odg/fail/.gitignore0
-rw-r--r--sd/qa/unit/data/odg/indeterminate/.gitignore0
-rw-r--r--sd/qa/unit/data/odg/pass/.gitignore0
-rw-r--r--sd/qa/unit/data/odg/pass/CVE-2012-4233-2.odgbin0 -> 67721 bytes
-rw-r--r--sd/qa/unit/filters-test.cxx4
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx6
7 files changed, 8 insertions, 3 deletions
diff --git a/sd/CppunitTest_sd_filters_test.mk b/sd/CppunitTest_sd_filters_test.mk
index 4440c1dafae8..132980a0be8f 100644
--- a/sd/CppunitTest_sd_filters_test.mk
+++ b/sd/CppunitTest_sd_filters_test.mk
@@ -114,6 +114,7 @@ $(eval $(call gb_CppunitTest_use_components,sd_filters_test,\
unotools/util/utl \
unoxml/source/rdf/unordf \
unoxml/source/service/unoxml \
+ xmloff/util/xo \
))
$(eval $(call gb_CppunitTest_use_configuration,sd_filters_test))
diff --git a/sd/qa/unit/data/odg/fail/.gitignore b/sd/qa/unit/data/odg/fail/.gitignore
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/sd/qa/unit/data/odg/fail/.gitignore
diff --git a/sd/qa/unit/data/odg/indeterminate/.gitignore b/sd/qa/unit/data/odg/indeterminate/.gitignore
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/sd/qa/unit/data/odg/indeterminate/.gitignore
diff --git a/sd/qa/unit/data/odg/pass/.gitignore b/sd/qa/unit/data/odg/pass/.gitignore
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/sd/qa/unit/data/odg/pass/.gitignore
diff --git a/sd/qa/unit/data/odg/pass/CVE-2012-4233-2.odg b/sd/qa/unit/data/odg/pass/CVE-2012-4233-2.odg
new file mode 100644
index 000000000000..321bd9cdbdf3
--- /dev/null
+++ b/sd/qa/unit/data/odg/pass/CVE-2012-4233-2.odg
Binary files differ
diff --git a/sd/qa/unit/filters-test.cxx b/sd/qa/unit/filters-test.cxx
index f274c2c94f73..a834686b48e7 100644
--- a/sd/qa/unit/filters-test.cxx
+++ b/sd/qa/unit/filters-test.cxx
@@ -205,6 +205,10 @@ void SdFiltersTest::testCVEs()
testDir(rtl::OUString("MS PowerPoint 97"),
getURLFromSrc("/sd/qa/unit/data/ppt/"),
rtl::OUString("sdfilt"));
+
+ testDir(rtl::OUString("draw8"),
+ getURLFromSrc("/sd/qa/unit/data/odg/"),
+ rtl::OUString("sdfilt"));
#endif
}
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index fb8598e8349b..1dc354368513 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -234,11 +234,11 @@ sal_Int32 ReadThroughComponent(
RTL_LOGFILE_CONTEXT_TRACE( aLog, "parser created" );
// get filter
+ OUString aFilterName(OUString::createFromAscii(pFilterName));
Reference< xml::sax::XDocumentHandler > xFilter(
- rFactory->createInstanceWithArguments(
- OUString::createFromAscii(pFilterName), rFilterArguments),
+ rFactory->createInstanceWithArguments(aFilterName, rFilterArguments),
UNO_QUERY );
- DBG_ASSERT( xFilter.is(), "Can't instantiate filter component." );
+ SAL_WARN_IF(!xFilter.is(), "sd", "Can't instantiate filter component: " << aFilterName);
if( !xFilter.is() )
return SD_XML_READERROR;
RTL_LOGFILE_CONTEXT_TRACE1( aLog, "%s created", pFilterName );