2011-04-11 15:35:58 -05:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
2013-04-19 15:10:42 -05:00
|
|
|
* This file is part of the LibreOffice project.
|
2011-04-11 15:35:58 -05:00
|
|
|
*
|
2013-04-19 15:10:42 -05:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2011-04-11 15:35:58 -05:00
|
|
|
*/
|
|
|
|
|
2011-10-12 09:19:21 -05:00
|
|
|
#include <unotest/filters-test.hxx>
|
|
|
|
#include <test/bootstrapfixture.hxx>
|
2011-04-11 15:35:58 -05:00
|
|
|
#include <com/sun/star/document/XFilter.hpp>
|
|
|
|
|
|
|
|
#include <osl/file.hxx>
|
|
|
|
#include <osl/process.h>
|
|
|
|
|
|
|
|
using namespace ::com::sun::star;
|
|
|
|
|
|
|
|
namespace
|
|
|
|
{
|
2011-10-12 09:19:21 -05:00
|
|
|
class LotusWordProTest
|
|
|
|
: public test::FiltersTest
|
|
|
|
, public test::BootstrapFixture
|
2011-04-11 15:35:58 -05:00
|
|
|
{
|
|
|
|
public:
|
2011-10-12 09:19:21 -05:00
|
|
|
LotusWordProTest() : BootstrapFixture(true, false) {}
|
2011-10-05 10:00:44 -05:00
|
|
|
|
2015-10-12 09:04:04 -05:00
|
|
|
virtual void setUp() override;
|
2011-04-11 15:35:58 -05:00
|
|
|
|
2013-04-07 05:06:47 -05:00
|
|
|
virtual bool load(const OUString &,
|
|
|
|
const OUString &rURL, const OUString &,
|
2015-10-12 09:04:04 -05:00
|
|
|
SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
|
2011-04-11 15:35:58 -05:00
|
|
|
|
|
|
|
void test();
|
|
|
|
|
|
|
|
CPPUNIT_TEST_SUITE(LotusWordProTest);
|
|
|
|
CPPUNIT_TEST(test);
|
|
|
|
CPPUNIT_TEST_SUITE_END();
|
|
|
|
private:
|
|
|
|
uno::Reference<document::XFilter> m_xFilter;
|
|
|
|
};
|
|
|
|
|
2011-10-05 10:00:44 -05:00
|
|
|
void LotusWordProTest::setUp()
|
2011-04-11 15:35:58 -05:00
|
|
|
{
|
2011-10-12 09:19:21 -05:00
|
|
|
test::BootstrapFixture::setUp();
|
2011-10-05 10:00:44 -05:00
|
|
|
|
2015-11-04 06:16:19 -06:00
|
|
|
m_xFilter.set(m_xSFactory->createInstance(
|
2012-12-10 18:00:16 -06:00
|
|
|
"com.sun.star.comp.Writer.LotusWordProImportFilter"),
|
2011-04-11 15:35:58 -05:00
|
|
|
uno::UNO_QUERY_THROW);
|
2011-04-27 03:31:31 -05:00
|
|
|
}
|
|
|
|
|
2013-04-07 05:06:47 -05:00
|
|
|
bool LotusWordProTest::load(const OUString &,
|
|
|
|
const OUString &rURL, const OUString &,
|
2015-03-18 06:03:28 -05:00
|
|
|
SfxFilterFlags, SotClipboardFormatId, unsigned int)
|
2011-04-11 15:35:58 -05:00
|
|
|
{
|
|
|
|
uno::Sequence< beans::PropertyValue > aDescriptor(1);
|
2012-12-10 18:00:16 -06:00
|
|
|
aDescriptor[0].Name = "URL";
|
2011-04-11 15:35:58 -05:00
|
|
|
aDescriptor[0].Value <<= rURL;
|
2011-09-30 06:39:08 -05:00
|
|
|
return m_xFilter->filter(aDescriptor);
|
2011-04-11 15:35:58 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void LotusWordProTest::test()
|
|
|
|
{
|
2013-04-07 05:06:47 -05:00
|
|
|
testDir(OUString(),
|
2016-03-09 07:14:18 -06:00
|
|
|
m_directories.getURLFromSrc("/lotuswordpro/qa/cppunit/data/"));
|
2011-04-11 15:35:58 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
CPPUNIT_TEST_SUITE_REGISTRATION(LotusWordProTest);
|
|
|
|
}
|
|
|
|
|
|
|
|
CPPUNIT_PLUGIN_IMPLEMENT();
|
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|