summaryrefslogtreecommitdiff
path: root/unotest
diff options
context:
space:
mode:
authorLászló Németh <laszlo.nemeth@collabora.com>2015-03-30 12:24:28 +0200
committerLászló Németh <laszlo.nemeth@collabora.com>2015-03-30 12:32:33 +0200
commit6ec9e87ced60add494f8d397017f8f9ffc65a00a (patch)
tree410d9761e033fa163e9e7167f0b792edd7c23043 /unotest
parentc5b85b075c1063907dc37e304b0911cd81f5b062 (diff)
Unit tests for SkipImages
SkipImages filter option skips image loading during DOC and DOCX imports, but it keeps the text of textboxes and custom shapes. Change-Id: Ia0ab3b350b9da22d9375787883678cc357a704b3
Diffstat (limited to 'unotest')
-rw-r--r--unotest/source/cpp/macros_test.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/unotest/source/cpp/macros_test.cxx b/unotest/source/cpp/macros_test.cxx
index 44f0d56e5540..02b14ba9f3e3 100644
--- a/unotest/source/cpp/macros_test.cxx
+++ b/unotest/source/cpp/macros_test.cxx
@@ -19,7 +19,7 @@ using namespace css;
namespace unotest {
-uno::Reference<css::lang::XComponent> MacrosTest::loadFromDesktop(const OUString& rURL, const OUString& rDocService)
+uno::Reference<css::lang::XComponent> MacrosTest::loadFromDesktop(const OUString& rURL, const OUString& rDocService, uno::Sequence<beans::PropertyValue> extraArgs)
{
CPPUNIT_ASSERT_MESSAGE("no desktop", mxDesktop.is());
uno::Reference<frame::XComponentLoader> xLoader = uno::Reference<frame::XComponentLoader>(mxDesktop, uno::UNO_QUERY);
@@ -39,6 +39,19 @@ uno::Reference<css::lang::XComponent> MacrosTest::loadFromDesktop(const OUString
args[1].State = beans::PropertyState_DIRECT_VALUE;
}
+ if (extraArgs.getLength() > 0)
+ {
+ sal_Int32 aSize = args.getLength();
+ args.realloc(aSize + extraArgs.getLength());
+ for (int i = 0; i < extraArgs.getLength(); i++)
+ {
+ args[aSize + i].Name = extraArgs[i].Name;
+ args[aSize + i].Handle = extraArgs[i].Handle;
+ args[aSize + i].Value = extraArgs[i].Value;
+ args[aSize + i].State = extraArgs[i].State;
+ }
+ }
+
uno::Reference<lang::XComponent> xComponent = xLoader->loadComponentFromURL(rURL, OUString("_default"), 0, args);
OUString sMessage = "loading failed: " + rURL;
CPPUNIT_ASSERT_MESSAGE(OUStringToOString( sMessage, RTL_TEXTENCODING_UTF8 ).getStr( ), xComponent.is());