2011-09-28 13:48:34 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
2013-04-19 21:10:42 +01:00
|
|
|
* This file is part of the LibreOffice project.
|
2011-09-28 13:48:34 +01:00
|
|
|
*
|
2013-04-19 21:10:42 +01: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-09-28 13:48:34 +01:00
|
|
|
*/
|
|
|
|
#ifndef INCLUDED_TEST_BOOTSTRAPFIXTURE_HXX
|
|
|
|
#define INCLUDED_TEST_BOOTSTRAPFIXTURE_HXX
|
|
|
|
|
|
|
|
#include <sal/config.h>
|
|
|
|
|
|
|
|
#include <rtl/string.hxx>
|
2012-08-01 10:05:05 +02:00
|
|
|
#include <tools/link.hxx>
|
|
|
|
#include <vcl/salctype.hxx>
|
2011-09-28 13:48:34 +01:00
|
|
|
#include <com/sun/star/uno/XComponentContext.hpp>
|
|
|
|
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
|
|
|
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
|
|
|
|
|
2013-11-09 15:38:58 -06:00
|
|
|
#include <cppunit/TestAssert.h>
|
|
|
|
#include <cppunit/TestFixture.h>
|
|
|
|
#include <cppunit/extensions/HelperMacros.h>
|
|
|
|
#include <cppunit/plugin/TestPlugIn.h>
|
|
|
|
#include <unotest/bootstrapfixturebase.hxx>
|
|
|
|
#include <test/testdllapi.hxx>
|
2011-09-28 13:48:34 +01:00
|
|
|
|
|
|
|
namespace test {
|
|
|
|
|
2014-03-05 11:11:41 +01:00
|
|
|
enum ValidationFormat
|
|
|
|
{
|
|
|
|
OOXML,
|
|
|
|
ODF
|
|
|
|
};
|
|
|
|
|
2011-09-28 13:48:34 +01:00
|
|
|
// Class to do lots of heavy-lifting UNO & environment
|
|
|
|
// bootstrapping for unit tests, such that we can use
|
|
|
|
// almost an entire LibreOffice during compile - so
|
|
|
|
// that we can get pieces of code alone to beat them up.
|
2011-10-05 16:00:44 +01:00
|
|
|
|
|
|
|
// NB. this class is instantiated multiple times during a
|
|
|
|
// run of unit tests ...
|
2011-10-12 15:19:21 +01:00
|
|
|
class OOO_DLLPUBLIC_TEST BootstrapFixture : public BootstrapFixtureBase
|
2011-09-28 13:48:34 +01:00
|
|
|
{
|
2011-10-05 16:00:44 +01:00
|
|
|
bool m_bNeedUCB;
|
|
|
|
bool m_bAssertOnDialog;
|
2011-09-28 13:48:34 +01:00
|
|
|
|
|
|
|
public:
|
2013-04-05 23:07:18 +02:00
|
|
|
DECL_STATIC_LINK( BootstrapFixture, ImplInitFilterHdl, ConvertData* );
|
|
|
|
|
2011-09-30 12:39:08 +01:00
|
|
|
BootstrapFixture( bool bAssertOnDialog = true, bool bNeedUCB = true );
|
2011-09-28 13:48:34 +01:00
|
|
|
virtual ~BootstrapFixture();
|
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual void setUp() SAL_OVERRIDE;
|
|
|
|
virtual void tearDown() SAL_OVERRIDE;
|
2014-03-05 11:11:41 +01:00
|
|
|
|
|
|
|
static void validate(const OUString& rURL, ValidationFormat);
|
2011-09-28 13:48:34 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|